Skip to content

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

Description

@lucarlig

Describe the bug

The bundled TypeScript everything-server omits the required resultType: "complete" discriminator from streamed tools/call responses on the MCP 2026-07-28 wire.

The scenario behavior check passes, but schema validation fails. The same failure occurs for all seven streamed tool-call fixture scenarios.

This was reproduced with 0.2.0-alpha.11 (c321dd3), and the affected branch remains on current main.

To Reproduce

npm ci
PORT=43117 npm exec -- tsx examples/servers/typescript/everything-server.ts
node dist/index.js server \
  --url http://127.0.0.1:43117/mcp \
  --spec-version 2026-07-28 \
  --scenario tools-call-simple-text \
  --verbose

Expected behavior

The streamed tools/call response should include resultType: "complete" and pass both the scenario behavior check and modern-wire schema validation.

Logs

Test Results:
Passed: 1/2, 1 failed, 0 warnings

CallToolResult: must have required property resultType (result of tools/call)
context: SSE event during tools/call

Additional context

Root cause: sendStatelessJson() correctly stamps resultType: "complete" on modern results. The streamed tools/call branch writes its SSE response directly with write({ jsonrpc: "2.0", id, result }), bypassing that normalization. The in-memory dispatch result is therefore placed on the 2026-07-28 wire without the required discriminator.

Proposed fix: stamp the complete-result discriminator before writing the streamed tool result, and add a fixture-to-fixture regression test that runs a streamed tool scenario on the 2026-07-28 wire.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions