Skip to content

Accept numeric JSON-RPC ids and progress tokens#232

Closed
leehack wants to merge 1 commit into
spec/mrtr-input-response-client-result-shapesfrom
spec/json-rpc-numeric-ids-progress-tokens
Closed

Accept numeric JSON-RPC ids and progress tokens#232
leehack wants to merge 1 commit into
spec/mrtr-input-response-client-result-shapesfrom
spec/json-rpc-numeric-ids-progress-tokens

Conversation

@leehack
Copy link
Copy Markdown
Owner

@leehack leehack commented Jun 1, 2026

Summary

  • accept finite numeric JSON-RPC request IDs and MCP progress tokens in addition to strings
  • validate SDK serialization paths so non-finite numbers are rejected before reaching the wire
  • expand edge-case tests and CLI conformance fixtures for numeric IDs/tokens

Spec Context

  • Official MCP stable and draft schemas define RequestId and ProgressToken as string | number.
  • This PR keeps the RC stack draft-only and targets spec/mrtr-input-response-client-result-shapes, not main.

Verification

  • dart format .
  • dart analyze
  • git diff --check
  • dart test
  • dart test -j 1
  • cd packages/mcp_dart_cli && dart test test/src/conformance_command_test.dart
  • cd packages/mcp_dart_cli && dart run mcp_dart_cli:mcp_dart conformance --suite all --json

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.40%. Comparing base (f1564e1) to head (8498c2a).

Additional details and impacted files
@@                                Coverage Diff                                @@
##           spec/mrtr-input-response-client-result-shapes     #232      +/-   ##
=================================================================================
+ Coverage                                          88.38%   88.40%   +0.01%     
=================================================================================
  Files                                                 47       47              
  Lines                                               9308     9312       +4     
=================================================================================
+ Hits                                                8227     8232       +5     
+ Misses                                              1081     1080       -1     
Flag Coverage Δ
unittests 88.40% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leehack
Copy link
Copy Markdown
Owner Author

leehack commented Jun 1, 2026

Closing this draft micro PR because the RC spec work has been consolidated into a smaller reviewable stack. This change is preserved in #270 (JSON-RPC metadata hardening); the consolidated tip is tree-identical to the previous micro-stack tip.

@leehack leehack closed this Jun 1, 2026
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.

1 participant