MCP endpoint

tools/call

Invoke one namespaced CoreSpeed tool and read its result or isError payload.

POSThttps://api.corespeed.io/mcptools/call

Holds, suspensions, and API-key spend caps are checked before a metered tool executes. Those refusals arrive as tool-level errors inside HTTP 200, not as HTTP failures — see Errors.

Authorizationstringheaderrequired

Bearer <token> — an MCP OAuth token, a sk-cs-… API key, or a user session JWT. x-api-key: <sk-cs-…> is accepted in its place.

Acceptstringheaderrequired

application/json, text/event-stream — the Streamable HTTP transport requires both media types even though CoreSpeed answers with JSON.

Content-Typestringheaderrequired

application/json. The transport rejects anything else with 415.

params.namestringrequired

A name returned by tools/list, e.g. memory__remember. An unknown or disabled name is not a transport error: it comes back as HTTP 200 with result.isError: true and the text Tool <name> not found. Nothing about a misspelled tool name shows up in the HTTP status.

params.argumentsobjectoptional

Arguments matching that tool's inputSchema. Optional in the MCP request schema — omit it for a tool that takes none, rather than sending {} — but required in practice for every tool whose inputSchema has required properties. Schema violations come back as a tool-level error, not a transport error.

result.contentarrayrequired

Content blocks. Text tools return { "type": "text", "text": "…" }; media tools return signed artifact URLs.

result.isErrorbooleanoptional

true when the tool refused or failed. The HTTP status is still 200, so branch on this field before treating a call as successful.

Most manage__* tools (API keys, connected accounts, whoami) require a human session. Called with an API key through /mcp they return HTTP 200 with isError: true and code jwt_session_required. The remote-connector lifecycle tools (manage__remote_add, manage__remote_list, manage__remote_refresh, manage__remote_remove) accept API keys, subject to their own role checks.

curl https://api.corespeed.io/mcp \
  -H "Authorization: Bearer $CORESPEED_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "memory__remember",
      "arguments": {
        "memory": "Rollout changes require a two-day review window.",
        "scope": "shared"
      }
    }
  }'
Tool succeeded
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Memory saved."
      }
    ],
    "structuredContent": {
      "id": "mem_01J…",
      "memory": "Rollout changes require a two-day review window."
    }
  }
}