You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Return JSON-RPC errors instead of HTTP 400 for filtered tool calls #5751
Part of #5743 (Workstream B: 2025-11-25 compliance).
Gap
When the tool-call gating middleware blocks a filtered tool, it returns HTTP 400 instead of a JSON-RPC error response (pkg/mcp/tool_filter.go, acknowledged in a code comment). MCP clients expect protocol-level errors for protocol-level problems; a transport 400 breaks client error handling and shows up as a connection problem rather than "tool not found".
Proposed work
Return a proper JSON-RPC error (method the spec uses for unknown tools — invalid params / tool not found semantics) over the negotiated response mode (JSON or SSE), keeping HTTP 400 only for genuinely malformed HTTP/JSON.
Activity
JAORMX commentedon Jul 8, 2026
Consolidated into #5764 (compliance polish bundle).