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

await platic.agents.tools.connect("agent_123", "tool_123");

Path parameters

ParameterTypeDescriptionRequired
agentIdstringAgent id✓
toolIdstringTool id: the id from the catalog✓

Request body

Optional. Without a body, the connection is active. To connect it paused:

FieldTypeDescriptionRequired
statestringactive 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

Statusdetails.codeWhen
400INVALID_REQUESTstate isn't active or paused. details.issues describes the problem.
404AGENT_NOT_FOUNDThe agent doesn't exist or belongs to another workspace.
404TOOL_NOT_FOUNDThe 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 200 and doesn't change its state, unless you send state: 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.