Skip to main content
Glama

Delete a voice agent

delete_agent
DestructiveIdempotent

Delete a voice agent. If it has a phone number attached, it gets safely detached first and the number stays on the account: give a voice number new routing with set_number_routing (PATCH /v1/numbers/{e164}) and a calls and SMS number with set_voice_sms_number_routing (PATCH /v1/voice-sms-numbers/{e164}). If detaching a calls and SMS number fails (in_progress: another operation is processing the number, or routing_failed: the engine could not disconnect it), the agent is not deleted and nothing changes: repeat the call shortly. Same data as DELETE /v1/agents/{id} (response schema in /openapi.json).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "delete_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId of the agent to delete, from list_agents. Looks like ag_9f3a2b7c4d1e.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare that this is destructive and idempotent; the description goes well beyond them by explaining that the phone number is detached and retained on the account, and that detachment failure is atomic (agent not deleted, nothing changes) with named error states in_progress and routing_failed and a retry instruction. That is exactly the mutation-failure context an agent needs before calling a destructive tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the action, then the detachment consequence, then the recovery routing calls, then the failure semantics. It is dense and the endpoint notation (PATCH /v1/numbers/{e164}) is packed into long clauses, but every sentence carries operational content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter destructive tool with no output schema, the description covers the side effects on the phone number, the follow-up tools needed to restore routing, the failure modes, and points to /openapi.json for the response schema. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single required parameter with 100% schema description coverage, including the source (list_agents) and the expected format (ag_9f3a2b7c4d1e). The description adds no further meaning about the id, so the schema carries this dimension.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Delete a voice agent') and immediately scopes the behavior to the attached-phone-number case, so an agent knows exactly what the call does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It tells the agent what to do after the delete (give the detached number new routing with set_number_routing for voice numbers, set_voice_sms_number_routing for calls/SMS numbers) and names the retry path on failure. It does not state when deletion is inappropriate or offer a non-destructive alternative, which keeps it short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.