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
Commit 02905d6
Browse filesBrowse the repository at this point in the historyBrowse files
MCP::Tool::Response.new([{ type:"text", text:"Running in #{region}" }])
175
+
end
176
+
end
177
+
end
178
+
```
179
+
180
+
The annotation must be a non-empty HTTP token, unique among the tool's annotations regardless of case,
181
+
and sit on a `string`, `integer`, or `boolean` property reachable from the schema root through `properties` keys only
182
+
(a `number` property is accepted as well, for compatibility with the conformance referee's fixtures, although the specification does not permit it).
183
+
Prefer `-` to `_` inside the name: proxies such as nginx drop header fields whose names hold an underscore by default,
184
+
and the request is then refused for its missing header.
185
+
Conforming clients drop a tool whose annotations break these rules and send no headers for it, and the transport validates nothing for such a tool.
186
+
187
+
`StreamableHTTPTransport` enforces the server side before the tool runs: on a `tools/call` of the modern lifecycle,
188
+
the `Mcp-Param-{Name}` header of each declared parameter must be present exactly when the body carries a value the client mirrors for it
189
+
(a string, a boolean, a finite float, or an integer within the safe JavaScript range; a value with no header rendering, such as an object, is left to argument validation)
190
+
and must agree with that value once a `=?base64?...?=` sentinel is decoded. A missing or disagreeing header,
191
+
a header whose argument is absent or `null` in the body, a header holding a byte outside the field-value set (visible ASCII, space, and tab)
192
+
without the sentinel, and a sentinel whose payload is not canonical Base64 or not UTF-8
193
+
are refused with HTTP 400 and JSON-RPC error `-32020` (`HeaderMismatch`) naming the header and, except in the two encoding refusals, the argument, never their values.
194
+
Integer and number parameters compare numerically when the header is a canonical decimal of at most 64 bytes, so a header of `42.0` agrees with a body value of `42`;
195
+
the comparison reads plain decimals only, so a number another SDK's client mirrors in exponent form is refused unless it repeats this SDK's own rendering byte for byte.
196
+
Headers for parameters without an annotation are ignored, and the handshake lifecycle (2025-11-25 and earlier) has no such headers.
197
+
156
198
## Tool Output Schemas
157
199
158
200
Tools can optionally define an `output_schema` to specify the expected structure of their results. This works similarly to how `input_schema` is defined and can be used in three ways.
0 commit comments