Disconnect a tool
SDK platic.agents.tools.disconnect()
Remove a tool from this agent by specifying its toolId in the URL. The change applies immediately, without publishing, and does not create a version. The tool remains in the workspace and on other agents. To delete it from all agents, delete its custom API or MCP server.
Example
curl -X DELETE https://api.platic.ai/v1/agents/$AGENT_ID/tools/$TOOL_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.tools.disconnect("agent_123", "tool_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent id | ✓ |
toolId | string | Tool id | ✓ |
Request body
No body.
Response
204 No Content, with no body.
Errors
| Status | details.code | When |
|---|---|---|
404 | AGENT_NOT_FOUND | The agent doesn't exist or belongs to another workspace. |
404 | TOOL_NOT_CONNECTED | The tool isn't connected to this agent. details.toolId names it. |
The format and codes for the rest of the API are in Errors.
Notes
- A tool that no agent uses stays in the workspace. It can be connected again.
- It is also how you remove a connection with
toolExists: false, the one left when the tool was deleted from the workspace. - For the agent to stop using it without losing the connection, use Pause or resume a tool.
- From an AI agent, the tool is
disconnect_agent_tool.