Skip to content

fix(shopping): add missing error declarations to MCP methods for REST parity#620

Open
prasad-stripe wants to merge 2 commits into
mainfrom
prasad-stripe/mcp-error-parity
Open

fix(shopping): add missing error declarations to MCP methods for REST parity#620
prasad-stripe wants to merge 2 commits into
mainfrom
prasad-stripe/mcp-error-parity

Conversation

@prasad-stripe

Copy link
Copy Markdown

Summary

The MCP service definition is missing error declarations that REST already surfaces. Update methods (update_checkout, update_cart) lack idempotency_conflict (REST returns HTTP 409 on PUT). Read methods (get_checkout, get_cart, get_order) lack invalid_params for malformed meta.

This PR adds:

  • idempotency_conflict to update_checkout and update_cart
  • invalid_params to get_checkout, get_cart, and get_order

Why this matters

MCP error declarations are the contract agent frameworks use to understand which failures are possible on each method. When declarations are incomplete, agents treat known error conditions as unexpected crashes rather than actionable signals they can recover from (fix params, retry with new idempotency key). REST already surfaces these errors; the MCP spec should declare the same contract.

Test plan

  • Valid OpenRPC 1.3.2 JSON after changes
  • Error refs point to existing components/errors entries (invalid_params and idempotency_conflict both defined)
  • Declaration-only change; no behavioral impact

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Jul 21, 2026
@carolinerg1 carolinerg1 added status:under-review gov:needs-tc-review and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 21, 2026
@carolinerg1

Copy link
Copy Markdown

Hi @prasad-stripe, thank you for submitting this PR. It looks like the Lint Code Base check is currently failing - could you please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants