Skip to main content
Glama

Hang Up an AI Voice-Agent Call

wa_ai_call_hangup
DestructiveIdempotent

[Not usable in this workspace: it acts on every number, and not every number's plan includes it — calling it returns a plan_required refusal; wa_get_plan lists each number's plan.] End a live AI voice-agent call — one you started with wa_ai_call_start, or an incoming call an agent answered. The call is hung up at once for both sides; its summary, transcript and recording then arrive as for any call (wa_ai_call_get). A call that has already ended is left alone (hung_up false).

Input Schema

NameRequiredDescriptionDefault
call_refYesthe call to end, from wa_ai_call_start or wa_ai_list_calls

Output Schema

NameRequiredDescriptionDefault
nextNowhat to do next
statusNothe call's status as recorded when you asked; it settles to done within a minute of a hangup
hung_upYestrue when the call was live and has been ended; false when it had already ended
refusalNopresent only when the request was declined

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / refusal / properties / account_status / description
      Previous value: -"when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked"New value: +"when the number is not working: its status — starting, not_running, whatsapp_down (telegram_down for a Telegram account), suspended, pairing, unlinked or locked"
  2. Changed1 schema field changed
    • addedOutput schema / properties / refusal / properties / candidates
      Added value: +{
      +  "description": "on an account_ambiguous refusal: the accounts to choose from — retry with one of these as account_id",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "account_id": {
      +        "description": "the id to retry with as account_id",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "the account's WhatsApp display name",
      +        "type": "string"
      +      },
      +      "phone": {
      +        "description": "the account's phone number, E.164",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "whether the number works right now — live, connecting, or why not, as wa_list_accounts reports it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  3. Changed3 schema fields changed
    • addedOutput schema / properties / refusal / properties / account_status
      Added value: +{
      +  "description": "when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / account_status_reason
      Added value: +{
      +  "description": "the detail of account_status, e.g. no_egress, stopped, no_plan",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / since
      Added value: +{
      +  "description": "when the number stopped working, RFC3339, when known",
      +  "type": "string"
      +}
  4. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare a non-read-only, destructive, idempotent operation; the description adds real substance on top: the hangup is immediate for both parties, an already-ended call is left alone and returns hung_up false, and post-call artifacts (summary, transcript, recording) still arrive. It also discloses the plan_required refusal mode and points at wa_get_plan.

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-loaded with the availability caveat and then the core action, with no filler sentences. The bracketed workspace note is somewhat long but is high-value routing information, so it earns its place.

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?

An output schema and annotations exist, so return-shape explanation is unnecessary; everything else an agent needs — availability precondition, effects on both parties, idempotent no-op behavior, and follow-up read path — is present.

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?

Only one parameter, and schema description coverage is 100% — the schema already says call_ref comes from wa_ai_call_start or wa_ai_list_calls. The description repeats the same provenance without adding format or edge-case detail, so the baseline 3 applies.

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?

States a specific verb and resource — end a live AI voice-agent call — and scopes it to both agent-started calls (wa_ai_call_start) and agent-answered incoming calls. It is clearly distinguishable from wa_ai_call_get (read results) and wa_ai_call_start (begin a call).

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 gives the operative condition (there is a live call to end) and routes result-reading to wa_ai_call_get and plan-checking to wa_get_plan, plus a workspace availability caveat. It does not spell out an explicit 'do not use this if…' exclusion beyond the plan note, so it is a strong 4 rather than 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.

Resources