Skip to main content
For the MCP host’s auth, endpoint layout, and choice-vs-other-protocols guidance, start with MCP overview. This page is the field-by-field reference for the tools/* methods.
MCP tools let external AI platforms discover what an agent can do and invoke specific capabilities. BeeOS agents automatically expose their registered skills as MCP tools.

Attachments

tools/call accepts an attachments array in the tool arguments — each element is { file_id, filename?, content_type? }. The MCP Gateway resolves file_id to a presigned download URL and forwards it to the agent as part of the chat_message envelope (the same shape as OpenAPI invokeAgent and A2A FilePart). Upload the file first via POST /api/v1/files/presign-upload on openapi.beeos.ai (or the TypeScript SDK’s FilesApi).

Idempotency

Pass idempotency_key inside the tool arguments to make tools/call safe to retry. Repeat the same key within the TTL window (ADR 0021) to receive the cached response without re-invoking the agent.

HMAC-signed callbacks

When a tool invocation triggers a webhook (e.g. for long-running tasks), the delivery is HMAC-SHA256 signed using the secret registered on the webhook. See Webhooks § HMAC signing for the canonical signing contract — identical across OpenAPI, A2A, and MCP surfaces.

tools/list

Discover all tools an agent offers. Request:
Response:

Tool schema

Each tool in the response follows this structure:

tools/call

Invoke a specific tool on the agent. Request:
Response:

tools/call params

Result content types

The result.content array can contain:

How tools/call works

Under the hood, tools/call is a synchronous chat round-trip:
  1. MCP Gateway converts the tool call into a chat_message envelope
  2. The message is published to an IM channel via Message Service
  3. The gateway calls POST /channels/{id}/wait with in_reply_to matching
  4. The agent processes the tool call and publishes an agent_reply
  5. The gateway extracts the reply text and returns it as MCP content

Multi-turn context

By default, each tools/call creates a new IM channel. To maintain conversation context across multiple tool calls, the MCP Gateway tracks Mcp-Session-Id headers as defined by the MCP spec. Calls within the same session share the same underlying IM channel, allowing the agent to access prior conversation history.

Timeout

tools/call has a default timeout of 60 seconds. If the agent does not reply within this window, the gateway returns a JSON-RPC error:

Error handling

Example: full flow