Sync catalog
Pulls the public MCP registry into our canonical copy and reports what changed. SuperAdmin only; every other caller is refused.
POST /v1/tool/catalog/sync
| Address | https://api.hanzo.ai/v1/tool/catalog/sync |
| Method | POST |
| Operation | post_tool_catalog_sync |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Pulls the public MCP registry into our canonical copy and reports what changed. SuperAdmin only; every other caller is refused.
It is IDEMPOTENT: a listing is keyed by the publisher's own reverse-DNS name, so a second pass over an unchanged registry rewrites the same rows and reports added=0, updated=0. It never deletes — a listing that vanishes upstream may be one an org has already enabled, and dropping its description would not drop its server. And it never touches CURATION: hidden, featured, an admin-set official and a logo survive every sync, because the write does not name those columns.
Request
The document declares no body for POST /v1/tool/catalog/sync. The handler is typed in cloud but its shape is not yet emitted, so the fields are not listed here — ask MCP's describe for post_tool_catalog_sync, which answers from the running route.
Response
| Status | Body | Meaning |
|---|---|---|
200 | tool.mcpCatalogSync | ok |
default | problem-details | refused |
200 body — 4 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
added | body | integer (int64) | — | Added is how many listings the catalog did not have before. |
registry | body | string | — | Registry is the upstream this pass read. |
total | body | integer (int64) | — | Total is how many listings the catalog holds now. |
updated | body | integer (int64) | — | Updated is how many the publisher has changed since we last looked. |
Failure carries the platform error shape — see Errors.
Examples
hanzo tool catalog syncimport { Configuration, ToolApi } from 'hanzoai';
const api = new ToolApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postToolCatalogSync();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ToolApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ToolApi(client).post_tool_catalog_sync()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.ToolAPI.PostToolCatalogSync(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, tool_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = tool_api::post_tool_catalog_sync(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ToolApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new ToolApi(client).postToolCatalogSync();The method above is the one at the current release of the document. [email protected] (npm) was generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl -X POST https://api.hanzo.ai/v1/tool/catalog/sync \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches tool through the tools tool, which names its 19 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_mcp_servers"
}
}
}'How is this guide?