Skip to content

feat(mcp): add stable machine-readable error details with retry hints - #1161

Closed
jeffrey-graham wants to merge 1 commit into
mind-vault-1:mainfrom
jeffrey-graham:feat/issue-1066-mcp-error-retry-hints
Closed

jeffrey-graham wants to merge 1 commit into
mind-vault-1:mainfrom
jeffrey-graham:feat/issue-1066-mcp-error-retry-hints

Conversation

@jeffrey-graham

@jeffrey-graham jeffrey-graham commented Nov 10, 2026 •

Copy link
Copy Markdown

Summary

Standardizes machine-readable MCP error details (mindvault.error/v1) with explicit retryable, suggestedDelayMs, and secret-redacted userMessage fields alongside existing error codes and categories.

  • Extends ErrorCodeSpec and ERROR_CODES in mcp/src/errorCodes.ts with retryable: boolean and suggestedDelayMs: number | null aligned with retry classification (MV_UNKNOWN and MV_PAYMENT_REJECTED remain non-retryable by default with suggestedDelayMs: null).
  • Adds retryHintFor(...) and safeUserErrorMessage(...) helpers with bounded retryAfterMs override clamping (0..300_000 ms) and secret redaction.
  • Extends ToolErrorPayload (toolErrorPayload) and updates docs/mcp-error-codes.md and docs/mcp-error-reference.md.

Verification

  • pnpm --filter @mindvault/mcp exec vitest run src/errorCodes.test.ts src/errorMapping.test.ts src/paymentRetry.test.ts src/malformedResponse.test.ts (159/159 passed)

Closes #1066

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.

[MCP] [Feature] Add stable machine-readable error details with retry hints

1 participant