Skip to main content
An attachment connects one tool to one agent and stores that agent’s invocation and override settings. Organization and built-in attachments pin a published version. MCP attachments pin the schema observed during discovery.

Prerequisites

  • An agent in shared tool mode. Agents created through the API start in shared mode; recreate an older agent to move it to shared mode.
  • A published organization tool, a ready-to-use built-in, or a connected MCP tool.
  • The current agent ID and permission to update it.
To attach tools when you first create the agent, include tool_refs in the create body. Creation applies them in one request, without the download-and-PUT step. See Create an agent.
1

Find the tool

Open the project, go to Tools, and choose Add Tool. Select a group, find the tool, then choose whether the model or system calls it. Some tools support only one invocation type.
The Add Tool menu with the Called by the model icon highlighted for Blank webhook

Choose the tool and its invocation type

2

Configure the attachment

Set Instructions shown to the model, arguments, and tool-specific options, then save. This instructions field maps to the API attachment description field.
An expanded webhook attachment with the Instructions shown to the model field highlighted

Configure the attachment

3

Verify the attachment

Confirm that the agent response contains the new attachment and every previous entry in tool_refs and mcp_refs. Then run a test call that exercises the tool.
Change tool_refs and mcp_refs through the download-and-PUT flow; PUT replaces the complete configuration. Use PATCH for top-level fields and the models block. A PATCH that includes tool_refs or mcp_refs returns AGENT_CONFIG_PREPARATION_REQUIRED, the signal to switch to the PUT flow.

Attachment fields

Value references can point to agent input or runtime memory with {{customer_id}}, or to call context with values such as {{@phone_number}}. A pre-action message can wait until the agent finishes speaking before execution starts.

Attach an MCP tool

An MCP attachment uses the server and discovered schema instead of a published version:
MCP attachment
Append this object to the complete current mcp_refs array and preserve tool_refs in the same partial update.

Upgrade a version

Publishing a new version does not change an attachment. Preview the upgrade, review changed arguments and configuration, then accept it. The attachment ID stays the same while its pinned version changes. See Tools API reference for the upgrade preview and accept endpoints.

Run a tool on call events

Configure deterministic lifecycle invocation and event arguments.