Skip to main content
Glama

WhatsMCP: MCP for WhatsApp

Hang Up an AI Voice-Agent Call

wa_ai_call_hangup
DestructiveIdempotent

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
    • 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"
      +  ]
      +}
  2. 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"
      +}
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds real substance: the hangup is immediate and affects both parties, and calls that have already ended are left untouched with hung_up false. That tells the agent what actually happens on a repeat call, beyond the bare idempotency hint.

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

Conciseness5/5

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

Three short sentences, front-loaded with the action, then effect, then downstream result and the idempotent edge case. No filler or restatement of the title.

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 single-parameter mutation with annotations and an output schema present, the description covers everything an agent needs: what it does, who it affects, what happens on repeat invocation, and where the artifacts surface afterwards.

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 (call_ref) at 100% schema coverage, so the schema already explains it fully. The description adds a little framing by implying the ref must reference a live call, but no format or sourcing detail beyond what the schema states.

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 precise verb+resource: 'End a live AI voice-agent call', and scopes it to calls started via wa_ai_call_start or answered incoming calls. That distinguishes it cleanly from wa_ai_call_start (initiate) and wa_ai_call_get (retrieve results) without needing the schemas.

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?

Explicitly says which calls it applies to (ones started with wa_ai_call_start or answered by an agent) and routes the agent to wa_ai_call_get for the resulting summary/transcript/recording. It also carves out the no-op case (already-ended calls). It does not name wa_ai_list_calls as the way to obtain a call_ref, which the schema does instead.

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