fix(mcp): validate list tool SDK sidecars - #336
Merged
Conversation
Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Aug 21, 2026
dodeja
marked this pull request as ready for review
August 21, 2026 12:21
SummaryReviewed 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 Verdict✅ Reviewed — no issues found. The validation change is focused and consistent with the surrounding MCP tool behavior. |
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.
Summary
unsupportedFilterssidecar in thelist_containersandlist_shipmentsMCP output schemasitems/links/metapayloadsRoot cause
The mapped SDK responses for both list managers always include a top-level
unsupportedFiltersarray—even when empty. Their strict MCP output schemas omitted that property, so the MCP SDK rejected otherwise valid structured content with-32602before returning it to schema-validating clients.list_tracking_requestsuses 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 passednpm run build --workspace @terminal49/mcp— passednpm run lint --workspace @terminal49/mcp— passednpx tsc --noEmit -p tsconfig.json— passedThe 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_steeringcontent.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Greptile Summary
This PR aligns the strict MCP output schemas for
list_containersandlist_shipmentswith the mapped SDK response shape and adds end-to-end regression coverage.unsupportedFilterssidecar for both list tools.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
unsupportedFiltersarray to both affected strict list-tool output schemas, resolving rejection of otherwise valid mapped responses.Reviews (1): Last reviewed commit: "fix(mcp): validate list tool sidecars" | Re-trigger Greptile