Tools
List the MCP tools this key can reach.
List the MCP tools this key can reach.
Send method=tools/list, assert the count is greater than zero, print three names. POST /v1/mcp is the fleet's one MCP door — it composes the typed product operations with the external MCP servers the caller's org has enabled — and it is now IN hanzo.yaml, which is what this flow was waiting for: an example built on an undeclared route is a hand-rolled HTTP call inside a generated client, the exact drift these SDKs exist to prevent. JSON-RPC reports failure INSIDE a 200, so an example reads error before result and result.isError before result.content. The same operation with method=tools/call runs one. cloud_get_v1_tools is the REST view of the same catalogue and stays available; the door is what an MCP client speaks. The automations door (/v1/automations/mcp — automations_mcp) is retired: it replies 405 to POST, the method it documents.
JSON-RPC call
POST /v1/mcp · reference →
One request, one response, three methods. initialize reports the
protocol version and server capabilities; tools/list returns every
tool this credential can reach; tools/call runs one by name.
Read error before result, and result.isError before
result.content: both failure channels live inside a 200.
id is declared a string. The wire accepts a number too — JSON-RPC 2.0
allows either and this door echoes back the type it was given — but a
scalar oneOf generates an empty carrier class in every typed language,
so the document declares the one form all of them can send.
| Parameter | In | Required | Description |
|---|---|---|---|
jsonrpc | body | yes | Always 2.0. |
id | body | — | Echoed back on the response; a request without one is a notification. JSON-RPC 2.0 allows a string OR a numbe |
method | body | yes | Anything else answers -32601 method not found. |
params | body | — |
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, MCPApi } from 'hanzoai';
const api = new MCPApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.mcpRpc({ jsonrpc: "<jsonrpc>", method: "initialize" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import MCPApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = MCPApi(client).mcp_rpc(jsonrpc="<jsonrpc>", method="initialize")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.MCPAPI.McpRpc(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, m_cp_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = m_cp_api::mcp_rpc(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.MCPApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new MCPApi(client).mcpRpc();curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "<jsonrpc>",
"method": "initialize"
}'The MCP door does not expose this operation as a tool. It answers tools/list at https://api.hanzo.ai/v1/mcp with the ones it does.
Every command, call and tool above is generated from the same OpenAPI document that generates the SDKs themselves — the four surfaces are projections of one doc comment, so they cannot disagree.
How is this guide?