feat(sacp): add tool enable/disable filtering for MCP servers#103
Merged
Conversation
Add ability to conditionally enable or disable MCP tools at build time: - EnabledTools enum with DenyList and AllowList variants - disable_tool(name) / enable_tool(name) methods that error on unknown tools - disable_all_tools() / enable_all_tools() to switch filtering modes - list_tools and call_tool filter based on enabled state Includes end-to-end tests with elizacp and cookbook documentation.
The goal is to enable standalone use. Next step: tests!
Tests for running McpServer directly with MCP clients via the Component<McpServerToClient> implementation, without going through ACP. - test_standalone_server_list_tools: verify tool listing - test_standalone_server_call_echo_tool: test string output tool - test_standalone_server_call_add_tool: test structured output tool - test_standalone_server_tool_not_found: verify error handling - test_standalone_server_with_disabled_tools: test tool filtering
JrConnectionBuilder now implements Component<H::Link>, allowing it to be used anywhere a Component is expected. This enables more compositional patterns where connection builders can be passed directly to functions expecting components.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ability to conditionally enable or disable MCP tools at build time:
Includes end-to-end tests with elizacp and cookbook documentation.