Skip to content

Protocol overview

Klaarin speaks the Model Context Protocol: JSON-RPC 2.0 over POST /mcp, with a GET /mcp SSE variant for clients that stream.

Methods

  • initializeHandshake — exchanges protocol versions and capabilities
  • notifications/initializedClient confirms the handshake completed
  • pingLiveness check
  • tools/listReturns the 14 tool schemas
  • tools/callExecutes one tool by name with arguments

Error codes

Failures follow the standard JSON-RPC error codes:

  • -32001Unauthorized — token missing, invalid or expired
  • -32602Invalid params — arguments failed the tool’s input schema
  • -32603Internal error
  • -32700Parse error — body is not valid JSON
  • -32601Unknown method
View example
tools/call request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_task",
    "arguments": {
      "projectId": 42,
      "name": "Review homepage copy",
      "priority": "high"
    }
  }
}
Transport
POST /mcp HTTP/1.1
Host: klaarin.com
Authorization: Bearer <access token>
Content-Type: application/json