Record

mcp-error

Standard MCP error structure.

Maps to JSONRPCError.error in the MCP spec:

  • code: number - "The error type that occurred"
  • message: string - "A short description of the error"
  • data?: unknown - "Additional information about the error"

See: https://modelcontextprotocol.io/specification/2025-06-18/schema#jsonrpcerror

record mcp-error {
  code: error-code,
  message: string,
  data: option​<string>,
}

Fields

NameTypeDescription
codeerror-code
messagestring
dataoption​<string>