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
stateless: tools/list leaks x-mcp-file to clients that did not declare fileInputs #1515
SEP-2356 says a client that did not declare the fileInputs capability MUST NOT see the x-mcp-file keyword in tool input schemas. The session wire strips it (server/dispatch.go:573, stripFileInputsFromTools). The stateless wire does not. server/stateless/handlers.go:19-31 returns d.Backend.Tools() unfiltered, and its comment says per-request stripping "lands when the example fixture starts exercising the path".
Reproduced on main at 88052be3. A stateless client with no fileInputs declaration calls tools/list against a server holding a tool with an x-mcp-file property, and gets:
The same call on the session wire returns the property without x-mcp-file.
Why it matters now
experimental/ext/agents (#1393) must return tool definitions in agents/get that match the caller's tools/list field for field (agents-wg#22). It reads the per-request declaration via ctx.ClientCaps() and strips correctly on both wires, so on the stateless wire it now disagrees with tools/list for exactly this case. The agents parity test covers every other combination.
Work
Strip x-mcp-file in the stateless tools/list when the per-request _meta carries no fileInputs capability (core.RequestMetaFromContext, per the capability rule in CLAUDE.md).
Test on the 2026-07-28 wire, with and without the declaration.
Add the stateless no-fileInputs case to the agents parity test (experimental/ext/agents/stateless_test.go).
Activity
panyam commentedon Oct 16, 2026
P2 → P1: a SEP-2356 MUST NOT broken on the stateless wire; first wave of mission #1552.
Merge pull request #1627 from panyam/feat/exercise-wire-1555