Type

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

type mcp-error = error;