Connect a tool
SDK platic.agents.tools.connect()
Connect an existing tool so an agent can use it. Send agentId and toolId in the URL. You can send state: "paused" if you do not want to activate it yet. The connection applies immediately, without publishing, and does not create a version.
Example
curl -X PUT https://api.platic.ai/v1/agents/$AGENT_ID/tools/$TOOL_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.tools.connect("agent_123", "tool_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent id | ✓ |
toolId | string | Tool id: the id from the catalog | ✓ |
Request body
Optional. Without a body, the connection is active. To connect it paused:
| Field | Type | Description | Required |
|---|---|---|---|
state | string | active or paused. Defaults to active. With paused it is connected but the agent doesn't use it. | — |
{ "state": "paused" } Response
201 Created with the new connection, or 200 OK with the one that already existed:
{
"status": "success",
"data": {
"toolId": "8fK2mQpLxT4vNbRc",
"name": "mcp_create_issue_a1b2c3",
"description": "Create a new issue in Linear",
"kind": "mcp",
"state": "active",
"toolExists": true,
"attachedAt": "2026-07-14T18:05:22.881Z"
}
} data is the connection, with the fields from List agent tools.
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | state isn't active or paused. details.issues describes the problem. |
404 | AGENT_NOT_FOUND | The agent doesn't exist or belongs to another workspace. |
404 | TOOL_NOT_FOUND | The tool doesn't exist in this workspace. details.toolId names it. |
The format and codes for the rest of the API are in Errors.
Notes
- The tool is shared with other agents; no copy is created. To create a new one, use a custom API or an MCP server.
- Connecting a tool that is already connected answers
200and doesn't change its state, unless you sendstate: then the connection ends up in that state. - For the agent to stop using it without losing the connection, use Pause or resume a tool. To remove it, Disconnect a tool.
- From an AI agent, the tool is
connect_agent_tool.