Skip to content

Commit b195a21

Browse files
authored
Merge pull request #506 from koic/cover_json_schema_2020_12_preservation_scenario
[Conformance] Cover the JSON Schema 2020-12 preservation scenario
2 parents f0c9665 + 927ccdd commit b195a21

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎conformance/client.rb‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ def build_provider_for(scenario, context)
182182
case scenario
183183
when "initialize"
184184
client.tools
185+
when "json-schema-2020-12-preservation"
186+
# SEP-1613/SEP-2106: echo the focal tool's observed inputSchema verbatim so the harness
187+
# can diff what the client preserved. Preservation holds because `Client::Tool#input_schema`
188+
# is the parsed response untouched.
189+
tools = client.tools
190+
focal = tools.find { |t| t.name == "json_schema_2020_12_tool" }
191+
abort("Tool json_schema_2020_12_tool not found") unless focal
192+
client.call_tool(name: "json_schema_echo", arguments: { "schema" => focal.input_schema })
185193
when "tools_call"
186194
tools = client.tools
187195
add_numbers = tools.find { |t| t.name == "add_numbers" }

‎conformance/expected_failures.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ client:
88
# are not implemented in `MCP::Client::HTTP` yet.
99
- http-custom-headers
1010
- http-invalid-tool-headers
11-
# Client-side JSON Schema preservation gaps: `$ref` values must reach the caller unresolved.
11+
# Client-side JSON Schema handling: `$ref` values must reach the caller unresolved,
12+
# and the conformance client does not run the scenario over the modern lifecycle yet.
1213
- json-schema-ref-no-deref
13-
- json-schema-2020-12-preservation
1414
# Unimplemented authorization extensions.
1515
- auth/dpop
1616
- auth/dpop-nonce

0 commit comments

Comments
 (0)