Skip to content

Conversation

@sevakva
Copy link

@sevakva sevakva commented Nov 19, 2025

This PR fixes an issue in MCPServer where run_context and agent parameters were required for all tool filtering scenarios, even when using static tool filtering that doesn't need them.

The fix moves the validation check for run_context and agent from the caller level into the dynamic filter branch of _apply_tool_filter.

@sevakva sevakva changed the title fix: enforce required parameters for dynamic tool filtering in MCPServer fix: allow static tool filtering without agent and run_context in MCPServer Nov 19, 2025
@seratch
Copy link
Member

seratch commented Nov 20, 2025

The _apply_tool_filter method always receives those parameters, so I don't see the necessity of this change. Can you elaborate more on the context?

@seratch seratch marked this pull request as draft November 20, 2025 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants