Fix MCP toolset prerequisites check - #990
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThe cache collection logic in Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant TM as ToolsetManager
participant Cache
participant TS as Toolset
Caller->>TM: load_toolsets()
TM->>Cache: get_cached_toolsets()
Cache-->>TM: cached_toolsets
loop per cached toolset t
TM->>TM: is_enabled(t)?
alt t.status == ENABLED or t.type == MCP
note right of TM #E7F6E7: collect t into enabled_toolsets_from_cache
TM->>TS: reload prerequisites / init_config as needed
TS-->>TM: ready
else
TM->>TM: skip t
end
end
TM-->>Caller: enabled_toolsets_from_cache
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mainred
left a comment
There was a problem hiding this comment.
Currently refresh toolsets happens when the first the user runs holmesgpt or specify refresh-toolsets, and mcp server is reachable, its status will be cached.
I think your case is mcp server is not reachable the first time we run hollmesgpt?
|
per my local test, the mcp endpoint is always reachable, but holmes failed to fetch its tool list. That's why I have this PR. |
Ensure MCP servers reload their tools even when previously failed by including MCP toolsets in prerequisites check regardless of status.
Head branch was pushed to by a user without write access
6bfb56a to
21b314d
Compare
77f05bf to
21b314d
Compare
There are high chances of empty MCP tools when using remote MCP server.
This PR ensures MCP servers reload their tools even when previously failed by including MCP toolsets in prerequisites check regardless of status.