Calling a connector
Every connector — REST or RPC — is reached through the same three tools. They are exposed as native agent tools and over the MCP server. The flow is always: discover the catalog, read the service passport, then execute.
list_services — the catalog
Returns the connector catalog: a canonical key and one-line summary per service. Handshake-sized (~2–5 KB), so every session can start here. With connected accounts, each entry is tagged connected: true/false.
describe_service — the passport
Returns a structured passport for one service: its modules, common recipes (concrete VERB /path examples with body templates), rate limits, field hints, pagination hints, enums, response examples, and a version/ttl for client-side caching. Call it without a module for the index, then with a module for the full per-module spec.
connector_execute — the call
A single executor for any connector. Arguments are validated against the service schema before any outbound HTTP call.
connector_execute parameters
| Field | Type | Description |
|---|---|---|
| servicerequired | string | Connector key from list_services (for example wildberries). May carry an account suffix — see multi-account addressing below. |
| module | string | Sub-area of the connector (statistics, content, …) as listed in the passport. |
| methodrequired | string | REST: the HTTP verb (GET/POST/…). RPC: the RPC method name. |
| path | string | REST: the request path. RPC: leave empty and pass the method name in method. |
| body | object | Request body for write calls. |
| query | object | Query-string parameters for the call. |
| instance_id | string | Target a specific connected account when more than one is connected. |
REST vs RPC
Connectors come in two shapes, and connector_execute handles both:
- REST (most connectors) — pass
module, an HTTPmethod, apath, andbody/query. - RPC (for example
bitrix24, theonecfamily) — leavepathempty and pass the RPC method name inmethod.
The passport's recipes show the exact shape for each connector, so you rarely guess.
Multi-account addressing
When an organization has connected more than one account for a service (several Ozon cabinets, for instance), address a specific one. A bare service name fans reads across all connected accounts; writes must name one, either via instance_id or a suffix on the service:
Did-you-mean recovery
Calls don't fail silently on a near-miss. Recipes are examples, not a whitelist, so:
- An unknown module returns a hard error with
did_you_meansuggestions and the list ofknown_modules. - An unknown or mismatched path still proceeds, but attaches a soft
path_did_you_meanhint plus anavailable_pathsmenu in the response metadata. - An unknown account returns
UNKNOWN_INSTANCEwith acandidateslist.
Errors
Connector calls return the standard tool error contract — code, message, retryable, and an optional hint. Calls made over MCP carry no HTTP status code. See the MCP error table and Errors & rate limits.