---
docId: doc_6f2e755b8c54409294aa4b757324bada
title: Disconnect a tool
description: Disconnects a tool from an agent. It applies immediately; the tool isn't deleted.
api:
  group: agentes/herramientas
  auth: bearer
  operations:
    - operationId: disconnectAgentTool
      method: DELETE
      path: '/v1/agents/{agentId}/tools/{toolId}'
      postmanName: Disconnect a tool
---

<script>
  import { Ways } from '$lib/components';
</script>

# Disconnect a tool

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](/api-reference/custom-apis) or [MCP server](/api-reference/mcp-servers).

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X DELETE https://api.platic.ai/v1/agents/$AGENT_ID/tools/$TOOL_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.agents.tools.disconnect("agent_123", "tool_123");
```

</Ways.Way>
</Ways>

## 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](/api-reference/errors).

## Notes

- A tool that no agent uses stays in the workspace. It can be [connected](/api-reference/agents/tools/connect) 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](/api-reference/agents/tools/pause).
- From an AI agent, the tool is [`disconnect_agent_tool`](/mcp/tools#tools).
