Toolhood/Docs/For developers
Build on itfrom any language.
Toolhood is plain HTTP. Talk MCP JSON-RPC to https://toolhood.xyz/mcp, or use the same tools through a small REST API. No SDK required.
MCPJSON-RPC over HTTP
Every request is a POST with a JSON-RPC body. Responses are JSON (no event stream), and you don't need a session: initialize is optional for scripts.
curl -s https://toolhood.xyz/mcp \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize",
"params":{"protocolVersion":"2025-06-18","capabilities":{},
"clientInfo":{"name":"my-script","version":"1.0"}}}'curl -s https://toolhood.xyz/mcp \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'MCPCall a tool
curl -s https://toolhood.xyz/mcp \ -H 'content-type: application/json' \ -H 'authorization: Bearer th_live_…' # optional \ -d '{"jsonrpc":"2.0","id":3,"method":"tools/call", "params":{"name":"chain_status","arguments":{}}}'
The result holds content[0].text (summary + compact JSON) and structuredContent (the same data as an object). A failed call returns isError: true with a plain message. Argument names for every tool are in the reference.
RESTEndpoints
The playground and the dashboard use these. Same tools, same limits, same execution path as MCP. Base: https://toolhood.xyz
| Request | Returns |
|---|---|
| GET /api/tools | The catalogue: {count, groups, tools:[{name, title, group, description, inputSchema, example}], limits} |
| POST /api/call | Body {tool, args} → {ok, tool, summary, data, ms} |
| POST /api/ask | Body {q} → {answer, steps:[{tool, args, summary, ms}], ms} |
| GET /api/status | Chain head, every tool's last probe and latency, data sources, version |
curl -s https://toolhood.xyz/api/call \
-H 'content-type: application/json' \
-d '{"tool":"token_price","args":{"token":"USDG"}}'Errors are {"error": {"code", "message", "retryAfter?"}} with a matching HTTP status. The codes are listed in the docs.
RESTAsk
/api/ask is "speak to the chain": an open model on Workers AI picks up to three tools, runs them, and answers only from what they returned. Every step it took comes back with the answer, so you can check it. Ask has a daily allowance per tier (see limits).
curl -s https://toolhood.xyz/api/ask \
-H 'content-type: application/json' \
-d '{"q":"What is the newest Pons launch and its market cap?"}'SigningSigning links
Prepare tools (prepare_transfer, prepare_swap, prepare_revoke, prepare_token_deploy) return a link like:
https://toolhood.xyz/sign#p=<base64url(JSON)>
| Field | Meaning |
|---|---|
| v, chainId | Format version (1) and 4663 for Robinhood Chain. |
| kind | transfer, swap, revoke, deploy or raw. |
| title, from | What it claims to do, and the only address allowed to sign it. |
| steps[] | {label, to, data, value} in order (for example approve, then swap). to: null means a contract deploy. |
| meta | The inputs (token, amount, spender…) so the page can cross-check its own decode. |
| exp | Unix seconds. Expired links can't be signed. |
SigningDecode one yourself
The fragment never reaches a server, so the page (and you) decode it locally:
const p = new URL(link).hash.slice(3); // after "#p="
const json = atob(p.replace(/-/g, '+').replace(/_/g, '/'));
const req = JSON.parse(json);
console.log(req.kind, req.title, req.steps.length, new Date(req.exp * 1000));Never trust title or label alone: decode data against the contract you expect. That is what the signing page does before it lets you sign.