Skip to content

fix(everything-server): normalize streamed tool responses - #462

Open
lucarlig wants to merge 1 commit into
modelcontextprotocol:mainfrom
lucarlig:user/luca/fix-streamed-tool-result-type
Open

fix(everything-server): normalize streamed tool responses#462
lucarlig wants to merge 1 commit into
modelcontextprotocol:mainfrom
lucarlig:user/luca/fix-streamed-tool-result-type

Conversation

@lucarlig

@lucarlig lucarlig commented Aug 18, 2026

Copy link
Copy Markdown

Normalizes streamed tools/call results from the bundled TypeScript everything-server so modern 2026-07-28 responses include the required resultType: "complete" discriminator.

Motivation and Context

The stateless JSON response helper adds the required discriminator, but the streamed tools/call branch wrote SSE frames directly and bypassed that normalization. The bundled reference fixture therefore produced schema-invalid modern-wire results for all seven streamed tool-call fixture scenarios.

This change centralizes stateless result normalization, applies it before both JSON and SSE output, and extends the existing fixture-to-fixture coverage to all seven streamed tool scenarios.

Fixes #461.

How Has This Been Tested?

  • npm test -- src/scenarios/server/all-scenarios.test.ts — 55/55 tests passed, including all seven streamed tool scenarios on the 2026-07-28 wire
  • npm test — 44 test files, 531/531 tests passed
  • npm run check
  • npm run build
  • node dist/index.js server --url http://127.0.0.1:43117/mcp --spec-version 2026-07-28 --scenario tools-call-simple-text --verbose — 2/2 checks passed

Breaking Changes

None. This corrects the bundled reference fixture's output to match the 2026-07-28 wire schema. It does not change public CLI, configuration, scenario, or check-ID interfaces.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

This is a focused reference-fixture correction and regression test. It does not add or change a conformance scenario, requirement, or check ID, so scenario registration, traceability updates, and external SDK validation are not applicable. No new error paths or documentation requirements are introduced.

Signed-off-by: lucarlig <luca.carlig@ibm.com>
@lucarlig
lucarlig marked this pull request as ready for review August 18, 2026 09:49
@lucarlig

Copy link
Copy Markdown
Author

@pcarleton @felixweinberger, could one of you approve the first-time-contributor Actions runs and review this focused everything-server fix? It resolves #461 and has full local validation: 531/531 tests, build, check, and all seven streamed tool scenarios on the 2026-07-28 wire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundled everything-server omits resultType on streamed tools/call responses

1 participant