Skip to content

fix(mcp): accept numeric path params, read-aware unreadable advice, report unsent code-mode calls - #10211

Merged
waleedlatif1 merged 1 commit into
stagingfrom
waleed/mcp-code-mode-review-fixes
Nov 19, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
waleed/mcp-code-mode-review-fixes

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • sim.api and the call tools accept numeric path params; describe_operation signatures declare some as numbers (e.g. version: number), and following them returned INVALID_CALL. Dispatch now stringifies params once with normalizeStringRecord
  • Unreadable answers get read/write-aware advice from one helper (unreadableMessage) used by both the call tools and code mode: a write is never told to retry, and only a read that came back too large is told to request less. Dispatch now reports just the fact
  • Code mode's call trace marks queued calls that were never sent as refused instead of "may still complete", so an agent can tell which writes may have happened

Fixes the review threads on the release PR (#10207) for code-mode.ts and catalog.ts, plus the trace issue found testing code mode live on staging.

Type of Change

  • Bug fix

Testing

  • code-mode.integration.ts (real /api/mcp, Postgres, isolate pool): 11/11 pass. New case: a numeric path param reaches its route (404, not INVALID_CALL). The queued-writes case now asserts that unsent calls are refused and that no more rows exist than calls sent
  • dispatch.test.ts: new case, a write that answers too large is told not to repeat it and never to request less
  • Each guard reverted separately goes red: the params schema, send tracking, and read/write advice
  • lib/api/mcp unit tests 47/47; check:utils, check:comment-hygiene, check:explicit-any, check:test-patterns, check:boundaries; pre-push type-check

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 19, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 19, 2026 6:44pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

This PR fixes numeric path values, safer advice for unreadable answers, and code-mode reports of calls that were never sent.

  • MCP calls pass numeric path values through to their API routes.
  • Unreadable MCP answers give advice that matches the operation and answer.
  • Code-mode traces mark queued calls that were never sent as refused.

No actionable issues found. Tests were inspected but not run.

Reviews (1) · Last reviewed commit: "fix(mcp): accept numeric path params, re..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 395212f into staging Nov 19, 2026
82 checks passed
@waleedlatif1
waleedlatif1 deleted the waleed/mcp-code-mode-review-fixes branch November 19, 2026 19:23

This branch was previously deployed

1 inactive deployment
Preview — dc816f6f Deployed Nov 19, 2026 by vercel[bot]
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