---
docId: doc_f53e41e40d24412eb2b11a11e06fd482
title: Pause or resume a tool
description: Pauses or resumes the connection between an agent and a tool. It applies immediately and only changes this agent.
api:
  group: agentes/herramientas
  auth: bearer
  operations:
    - operationId: setAgentToolState
      method: PATCH
      path: '/v1/agents/{agentId}/tools/{toolId}'
      postmanName: Pause or resume a tool
---

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

# Pause or resume a tool

Choose whether an agent can use a tool: send `state: "paused"` to pause it or `state: "active"` to activate it. Pausing keeps the connection. **The change applies immediately, without publishing**, does not create a version and only affects this agent.

## Example

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

```bash
curl -X PATCH https://api.platic.ai/v1/agents/$AGENT_ID/tools/$TOOL_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "state": "paused" }'
```

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

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

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `agentId` | string | Agent id | ✓ |
| `toolId` | string | Tool id | ✓ |

## Request body

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| `state` | string | `paused` pauses it; `active` resumes it. | ✓ |

```json
{ "state": "paused" }
```

## Response

`200 OK` with the connection:

```json
{
  "status": "success",
  "data": {
    "toolId": "8fK2mQpLxT4vNbRc",
    "name": "mcp_create_issue_a1b2c3",
    "description": "Create a new issue in Linear",
    "kind": "mcp",
    "state": "paused",
    "toolExists": true,
    "attachedAt": "2026-07-14T18:05:22.881Z"
  }
}
```

`data` is the connection, with the fields from [List agent tools](/api-reference/agents/tools/list#response-fields).

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | `state` is missing or isn't `active` or `paused`. |
| `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. |
| `404` | `TOOL_NOT_CONNECTED` | Pausing a tool that 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

- Resuming a tool that wasn't connected connects it: `{ "state": "active" }` always leaves the connection active.
- Pausing doesn't change the tool, its API or its MCP server.
- To remove the connection, use [Disconnect a tool](/api-reference/agents/tools/disconnect).
- From an AI agent, the tool is [`set_agent_tool_state`](/mcp/tools#tools).
