Skip to content

Commit 7a2e7ab

Browse files
committed
Reuse the initialize handler for json-schema-ref-no-deref
The scenario only requires the client to call tools/list against a server advertising a network $ref; ClientSession never resolves $refs, so the existing initialize handler (initialize + list_tools) already satisfies it. Register it under both names instead of duplicating it.
1 parent a53b892 commit 7a2e7ab

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

.github/actions/conformance/client.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ async def handle_callback(self) -> tuple[str, str | None]:
164164

165165

166166
@register("initialize")
167+
# SEP-2106: json-schema-ref-no-deref only requires the client to call tools/list against a
168+
# server advertising a tool with a network $ref. ClientSession never walks inputSchema or
169+
# resolves $refs, so plain initialize + list_tools satisfies it; no dedicated handler needed.
170+
@register("json-schema-ref-no-deref")
167171
async def run_initialize(server_url: str) -> None:
168172
"""Connect, initialize, list tools, close."""
169173
async with streamable_http_client(url=server_url) as (read_stream, write_stream):
@@ -185,16 +189,6 @@ async def run_tools_call(server_url: str) -> None:
185189
logger.debug(f"add_numbers result: {result}")
186190

187191

188-
@register("json-schema-ref-no-deref")
189-
async def run_json_schema_ref_no_deref(server_url: str) -> None:
190-
"""List tools whose schemas contain a network `$ref`; must not dereference it (SEP-2106)."""
191-
async with streamable_http_client(url=server_url) as (read_stream, write_stream):
192-
async with ClientSession(read_stream, write_stream) as session:
193-
await session.initialize()
194-
tools_result = await session.list_tools()
195-
logger.debug(f"Listed tools without dereferencing network $refs: {[t.name for t in tools_result.tools]}")
196-
197-
198192
@register("sse-retry")
199193
async def run_sse_retry(server_url: str) -> None:
200194
"""Connect, initialize, list tools, call test_reconnection, close."""

0 commit comments

Comments
 (0)