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
curl -sS https://api.mot3r.com/v1/toolsResponse 200
{
"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
}| Name | Type | Description |
|---|---|---|
tools | array | One object per tool: name, description, inputSchema (JSON Schema of the request body) and annotations. Read-only tools carry readOnlyHint: true. |
count | integer | Number of tools in the list. |
Error 401
A root key is refused on this route, as it is on /mcp:
{"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | Tool name from GET /v1/tools, for example mDM_send. |
Idempotency-Key | header | string | no | Request 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. |
| body | body | object | no | The tool's arguments, as described by its inputSchema. |
Request
Two examples follow: a read and a write.
#Read: list your channels
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
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.
{
"content": [
{ "type": "text", "text": "{\"ok\":true,\"message_id\":\"6c1f0a2e-4b7d-4f3a-9e21-0d5c8b7a6f10\"}" }
]
}| Name | Type | Description |
|---|---|---|
content | array | Tool output blocks. Most tools return one text block holding JSON. |
structuredContent | object | Present when the tool returns structured output. |
Error 400
{"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:
{
"error": { "status": 422, "reason": "tool_error", "message": "recipient not found" },
"result": { "content": [ { "type": "text", "text": "recipient not found" } ], "isError": true }
}Common reasons:
| Status | Reason | When |
|---|---|---|
| 400 | bad_json | The body is not valid JSON. |
| 400 | bad_arguments | The body is JSON but not an object. |
| 400 | unknown_tool | No tool with this name. |
| 400 | invalid_arguments | The body does not match the tool's inputSchema. The tool did not run. |
| 400 | bad_request_id | The Idempotency-Key has a character or length outside the rules. |
| 401 | missing_credential | No Authorization header. |
| 401 | root_key_not_allowed | A root key was sent. Use a tunnel key or a test key. |
| 401 | invalid_credential | The key is unknown or revoked. |
| 402 | insufficient_balance | The balance does not cover the call. The tool did not run. |
| 403 | scope_denied, service_off | The key has no scope for the tool's family, or the family is switched off in the panel. |
| 403 | trust_too_low | The account is below the trust level of the tool's family. |
| 405 | method_not_allowed | GET on a tool, or POST on the list. |
| 409 | duplicate_request | This request id was already used. The tool did not run a second time. |
| 409 | request_in_flight | A call with this request id is still running. |
| 422 | tool_error | The tool ran and failed. The call was not charged. |
| 423 | line_off, line_muted | The owner switched the tunnel off, or muted it and the tool sends something out. |
| 429 | rate_limited | The key's requests-per-minute limit is reached. See Retry-After. |
| 503 | hold_unavailable, auth_unavailable | The ledger did not answer. The tool did not run and the call was not charged. Retry in a moment. |