Skip to content

fix(mcp): validate list tool SDK sidecars - #336

Merged
dodeja merged 1 commit into
mainfrom
cursor/fix-list-output-schema-0c41
Aug 21, 2026
Merged

fix(mcp): validate list tool SDK sidecars#336
dodeja merged 1 commit into
mainfrom
cursor/fix-list-output-schema-0c41

Conversation

@dodeja

@dodeja dodeja commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • declare the SDK unsupportedFilters sidecar in the list_containers and list_shipments MCP output schemas
  • add end-to-end MCP client regression coverage using realistic mapped items / links / meta payloads
  • verify response contracts and assistant-only steering content remain present

Root cause

The mapped SDK responses for both list managers always include a top-level unsupportedFilters array—even when empty. Their strict MCP output schemas omitted that property, so the MCP SDK rejected otherwise valid structured content with -32602 before returning it to schema-validating clients. list_tracking_requests uses a different SDK manager that does not add this sidecar, explaining why it remained valid.

Scope

Pagination and filter forwarding are unchanged. Arbitrary mapped item fields remain accepted by the existing record schema. Tool annotations remain read-only for all reads and non-read-only only for track_container. No reviewer fixtures or demo data are changed.

Verification

  • npm run test --workspace @terminal49/mcp -- --run — 14 files, 184 tests passed
  • npm run build --workspace @terminal49/mcp — passed
  • npm run lint --workspace @terminal49/mcp — passed
  • npx tsc --noEmit -p tsconfig.json — passed

The regression test calls both tools over a modern MCP client/HTTP transport, which exercises the SDK's actual output-schema validation path and covers mapped item fields, pagination links/meta, unsupportedFilters, _response_contract, and assistant-only _agent_steering content.

Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Greptile Summary

This PR aligns the strict MCP output schemas for list_containers and list_shipments with the mapped SDK response shape and adds end-to-end regression coverage.

  • Declares the top-level unsupportedFilters sidecar for both list tools.
  • Tests empty and populated sidecars through a modern MCP client and HTTP transport.
  • Verifies structured response contracts and assistant-only steering content remain available.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or quality issues identified.

The schema additions match the documented mapped SDK response shape, preserve existing list behavior, and are covered through the actual MCP client and HTTP handler path for both affected tools.

Important Files Changed

Filename Overview
packages/mcp/src/server.ts Adds the SDK-provided unsupportedFilters array to both affected strict list-tool output schemas, resolving rejection of otherwise valid mapped responses.
packages/mcp/src/mcp.test.ts Adds realistic client-level regression tests for both list tools, including mapped payloads, pagination metadata, response contracts, and assistant-only steering.

Reviews (1): Last reviewed commit: "fix(mcp): validate list tool sidecars" | Re-trigger Greptile

Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api Ready Ready Preview Aug 21, 2026 6:02am

Request Review

@dodeja
dodeja marked this pull request as ready for review August 21, 2026 12:21
@dodeja
dodeja merged commit cd985b1 into main Aug 21, 2026
23 checks passed
@vorflux

vorflux Bot commented Aug 21, 2026

Copy link
Copy Markdown

Summary

Reviewed the changes to validate MCP list-tool SDK sidecars, including the output-schema handling and its integration with the existing tool response flow. The reviewed patch at 2a1166b71df8391b8482fd3c2d6544be84fc1602 did not reveal any actionable correctness, security, compatibility, error-handling, data-loss, or concurrency issues.

Verdict

Reviewed — no issues found. The validation change is focused and consistent with the surrounding MCP tool behavior.

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.

2 participants