|
11 | 11 | --spec-version is omitted the harness picks per-scenario (LATEST_SPEC_VERSION |
12 | 12 | for active scenarios, DRAFT_PROTOCOL_VERSION for draft-only ones). |
13 | 13 | - Server URL as last CLI argument (sys.argv[1]) |
14 | | - - Must exit 0 within 30 seconds |
| 14 | + - Must exit 0 within the harness --timeout (CI passes 60s; the default is 30s) |
15 | 15 |
|
16 | 16 | Scenarios: |
17 | 17 | initialize - Connect, initialize, list tools, close |
18 | 18 | tools_call - Connect, call add_numbers(a=5, b=3), close |
19 | 19 | sse-retry - Connect, call test_reconnection, close |
20 | 20 | json-schema-ref-no-deref - Connect, list tools (no $ref deref) |
| 21 | + json-schema-2020-12-preservation - List tools, echo the focal inputSchema back verbatim |
21 | 22 | request-metadata - Connect with all callbacks; client stamps _meta |
22 | 23 | http-standard-headers - Connect, call a tool (Mcp-* headers checked) |
23 | 24 | http-invalid-tool-headers - List tools, call every surfaced tool (x-mcp-header filter) |
| 25 | + http-custom-headers - Replay the harness's toolCalls (x-mcp-header -> Mcp-Param-*) |
24 | 26 | elicitation-sep1034-client-defaults - Elicitation with default accept callback |
25 | 27 | sep-2322-client-request-state - Drive the MRTR auto-loop (SEP-2322) |
26 | 28 | auth/client-credentials-jwt - Client credentials with private_key_jwt |
@@ -252,6 +254,21 @@ async def run_json_schema_ref_no_deref(server_url: str) -> None: |
252 | 254 | await client.list_tools() |
253 | 255 |
|
254 | 256 |
|
| 257 | +@register("json-schema-2020-12-preservation") |
| 258 | +async def run_json_schema_2020_12_preservation(server_url: str) -> None: |
| 259 | + """List tools, then echo the focal tool's inputSchema back verbatim (SEP-1613 / SEP-2106). |
| 260 | +
|
| 261 | + The harness diffs what the client round-trips through `json_schema_echo` against its |
| 262 | + fixture to detect 2020-12 keywords ($schema, $defs, $anchor, additionalProperties, |
| 263 | + allOf/anyOf, if/then/else) being stripped while parsing tools/list. Unlike |
| 264 | + json-schema-ref-no-deref, this mock is version-aware, so client_mode() applies. |
| 265 | + """ |
| 266 | + async with Client(server_url, mode=client_mode()) as client: |
| 267 | + listed = await client.list_tools() |
| 268 | + focal = next(tool for tool in listed.tools if tool.name == "json_schema_2020_12_tool") |
| 269 | + await client.call_tool("json_schema_echo", {"schema": focal.input_schema}) |
| 270 | + |
| 271 | + |
255 | 272 | @register("tools_call") |
256 | 273 | async def run_tools_call(server_url: str) -> None: |
257 | 274 | """Connect, list tools, call add_numbers(a=5, b=3), close.""" |
|
0 commit comments