Skip to content
Panel

API Reference Endpoints

Tools over REST

Call any tool of your tunnel with plain HTTP and JSON, for clients that do not speak MCP.

Every tool the MCP endpoint publishes can also be called with one HTTP request. Use this when your client has no MCP support: a script, a cron job, a backend in any language. The REST routes run the same checks as tools/call on https://mcp.mot3r.com/mcp: the same key rules, trust level, rate limit and tunnel switch, and the same metering. A call is reserved against the balance before the tool runs, charged when it succeeds and released when it fails, at the same price as over MCP. Error responses use the envelope described in Errors.

#List tools

GET /v1/tools

Returns every tool with its name, description and input schema. This is the same list as tools/list over MCP. The key is optional, as it is for tools/list.

Authentication: none required. With a tunnel key or a test key the list shows the tools that key sees.

Parameters

This endpoint takes no parameters.

Request

bash
curl -sS https://api.mot3r.com/v1/tools

Response 200

JSON
{
  "tools": [
    {
      "name": "mIRC_list",
      "description": "List channels available to the current user.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": { "default": 100, "type": "integer", "minimum": 1, "maximum": 500 },
          "offset": { "default": 0, "type": "integer", "minimum": 0 }
        }
      },
      "annotations": { "title": "List your channels", "readOnlyHint": true }
    }
  ],
  "count": 86
}
NameTypeDescription
toolsarrayOne object per tool: name, description, inputSchema (JSON Schema of the request body) and annotations. Read-only tools carry readOnlyHint: true.
countintegerNumber of tools in the list.

Error 401

A root key is refused on this route, as it is on /mcp:

JSON
{"error":{"status":401,"reason":"root_key_not_allowed","message":"Unauthorized — the root key (mot_sk_) never works on /mcp; use a tunnel key (mot_lk_) or a test key (mot_tk_)."}}

#Call a tool

POST /v1/tools/{name}

Runs one tool. The request body is the tool's arguments as a JSON object, exactly what arguments would be in an MCP tools/call. A tool without arguments takes an empty body or {}.

Authentication: tunnel key or test key. A root key is refused with 401 root_key_not_allowed.

Parameters

NameInTypeRequiredDescription
namepathstringyesTool name from GET /v1/tools, for example mDM_send.
Idempotency-KeyheaderstringnoRequest id, 1 to 128 characters: letters, digits, ., _, : or -. The same id is never run or charged twice, over REST or over MCP. When omitted, X-Request-Id is used; when both are missing, a random id is generated. Recommended for every tool that writes.
bodybodyobjectnoThe tool's arguments, as described by its inputSchema.

Request

Two examples follow: a read and a write.

#Read: list your channels

bash
curl -sS -X POST https://api.mot3r.com/v1/tools/mIRC_list \
  -H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx" \
  -H "content-type: application/json" \
  -d '{"limit":20}'

#Write: send a direct message

bash
curl -sS -X POST https://api.mot3r.com/v1/tools/mDM_send \
  -H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: greeting-0001" \
  -d '{"to":"<recipient id>","text":"Hello from a REST client."}'

Response 200

The response carries the header x-request-id with the request id that was used. The body is the tool result, the same object MCP returns in result.

JSON
{
  "content": [
    { "type": "text", "text": "{\"ok\":true,\"message_id\":\"6c1f0a2e-4b7d-4f3a-9e21-0d5c8b7a6f10\"}" }
  ]
}
NameTypeDescription
contentarrayTool output blocks. Most tools return one text block holding JSON.
structuredContentobjectPresent when the tool returns structured output.

Error 400

JSON
{"error":{"status":400,"reason":"unknown_tool","message":"Bad request — no tool with this name for this key. Ask tools/list which tools your key sees."}}

Error 422

When the tool itself fails (for example, the recipient does not exist), the call is not charged and the response is an error with the tool output kept under result:

JSON
{
  "error": { "status": 422, "reason": "tool_error", "message": "recipient not found" },
  "result": { "content": [ { "type": "text", "text": "recipient not found" } ], "isError": true }
}

Common reasons:

StatusReasonWhen
400bad_jsonThe body is not valid JSON.
400bad_argumentsThe body is JSON but not an object.
400unknown_toolNo tool with this name.
400invalid_argumentsThe body does not match the tool's inputSchema. The tool did not run.
400bad_request_idThe Idempotency-Key has a character or length outside the rules.
401missing_credentialNo Authorization header.
401root_key_not_allowedA root key was sent. Use a tunnel key or a test key.
401invalid_credentialThe key is unknown or revoked.
402insufficient_balanceThe balance does not cover the call. The tool did not run.
403scope_denied, service_offThe key has no scope for the tool's family, or the family is switched off in the panel.
403trust_too_lowThe account is below the trust level of the tool's family.
405method_not_allowedGET on a tool, or POST on the list.
409duplicate_requestThis request id was already used. The tool did not run a second time.
409request_in_flightA call with this request id is still running.
422tool_errorThe tool ran and failed. The call was not charged.
423line_off, line_mutedThe owner switched the tunnel off, or muted it and the tool sends something out.
429rate_limitedThe key's requests-per-minute limit is reached. See Retry-After.
503hold_unavailable, auth_unavailableThe ledger did not answer. The tool did not run and the call was not charged. Retry in a moment.