Repository navigation
Conversation
The stateless tools/call branches for test_logging_tool and test_streaming_elicitation write their response by hand: they emit a notification line before the result, so they cannot go through res.json(). That bypassed normalizeStatelessResponse, so their results omitted resultType -- a MUST for results on the 2026-07-28 wire. The reference fixture was therefore failing the rule the suite grades, and any scenario that validates the fixture's frames against the schema saw a violation. Route both payloads through the same normalization the neighbouring sendStatelessJson dispatch already uses.
Adds a server-direction counterpart to src/scenarios/client/draft-result-fields.test.ts: it pins that the two hand-written stateless tools/call branches return resultType: "complete" on the 2026-07-28 wire. Both cases fail against the unpatched fixture with the missing member and pass after the previous commit.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #562.
Problem
test_logging_toolandtest_streaming_elicitationare the two statelesstools/callbranches that write their response by hand: each emits anotification line first, so it cannot use
res.json(). Writing directly withres.end(JSON.stringify(...))also bypassednormalizeStatelessResponse, sotheir results came back without
resultType:resultTypeis a MUST on results on the 2026-07-28 wire, so the referencefixture was failing the rule the suite grades, and the dedicated
test_logging_toolbranch stayed outside the normalization that #462 applied tothe streamed tool responses.
Change
Both branches now build their payload and pass it through
normalizeStatelessResponse(method, ...)- the same helper the neighbouringsendStatelessJsondispatch already uses. The notification frames areuntouched.
Evidence
New
src/scenarios/server/draft-result-fields.test.ts, the server-directioncounterpart of
src/scenarios/client/draft-result-fields.test.ts, before thefixture fix:
Both cases failed the same way; after the fix:
The test also pins the notification frame of each branch:
tools/callwith nologLevel_metamust not log, and the elicitation branch writes itsnotifications/progressline unconditionally.Verification
npm test- 49 files, 643 tests passednpm run lint(eslint +prettier --check .) - cleannpm run typecheck- cleanI reproduced it against the fixture directly (
npx tsx examples/servers/typescript/everything-server.ts, thenPOST tools/callwithMCP-Protocol-Version: 2026-07-28); no real-SDK run was needed because thechange is confined to the fixture's own response shape, which no check
inspects.
Per AGENTS.md this was prepared with an AI coding agent pointed at this open
issue as the concrete target; I reviewed every change and ran the commands
above myself.