Pause or resume a tool

SDK platic.agents.tools.setState()

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

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

Path parameters

ParameterTypeDescriptionRequired
agentIdstringAgent id✓
toolIdstringTool id✓

Request body

FieldTypeDescriptionRequired
statestringpaused pauses it; active resumes it.✓
{ "state": "paused" }

Response

200 OK with the connection:

{
  "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.

Errors

Statusdetails.codeWhen
400INVALID_REQUESTstate is missing or isn't active or paused.
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.
404TOOL_NOT_CONNECTEDPausing 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.

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.
  • From an AI agent, the tool is set_agent_tool_state.