Skip to main content
Glama

wait_for_call_event

Read-only

Long-poll for the next event on a call placed under control:"mcp" (place_call). Blocks up to timeout_seconds (1-25, default 20) waiting for a new event. A TIMEOUT IS A NORMAL RESULT, NOT AN ERROR: the response comes back 200 with timed_out:true and an empty events list — call this tool again immediately, passing after_seq=<the previous response's next_seq>, to keep waiting; this is the intended loop, not a failure to retry around. Events with response_required:true (call.answered, digits.received, actions.completed) must be answered with respond_to_call_event before the call can proceed. Terminal events (call.completed, call.failed, call.no_answer, call.busy) end the call and the loop.

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": {
      "call_id": "<call_id>"
    },
    "name": "wait_for_call_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
call_idYesthe call UUID returned by place_call's control:"mcp" response (the same call's HD_ session id also works)
purposeNoRequired on tools that read data or reports; recommended on every tool. One sentence: what you are doing and why (for example "finding this caller's open ticket to answer them"). Building a report, dashboard, analytics or an export is a SautiDesk Pro feature done by the report tools, not by pulling records.
after_seqNocursor: only return events after this sequence number; echo back the previous call's next_seq to resume waiting (default 0 — from the start of the call)
timeout_secondsNolong-poll hold time in seconds, 1-25 (default 20, clamped server-side); a timeout is a NORMAL result, not an error — call again with next_seq to keep waiting

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true and openWorldHint=false, so the description carries the real burden of explaining blocking behavior, the 1-25 second hold, and that a timeout returns 200 with timed_out:true rather than an error. It also enumerates which event types require action and which terminate the loop, though it does not describe every possible event type.

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 purpose, then the timeout-is-normal warning, then event handling rules. It is dense but every sentence carries operational weight, with minor redundancy between the description and the schema's timeout_seconds and after_seq descriptions.

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?

There is no output schema, and the description compensates by describing the response shape (timed_out flag, empty events list, next_seq cursor) and the full loop contract. An agent has everything needed to drive the long-poll correctly without guessing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds value by tying after_seq to the previous response's next_seq output field and by explaining the after_seq loop mechanics that the schema only gestures at. The timeout default and range are restated rather than new.

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 ('Long-poll for the next event on a call') and scopes it to calls placed under control:"mcp" (place_call), which cleanly separates it from get_call, respond_to_call_event, and other siblings.

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

Usage Guidelines5/5

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

Gives explicit when-to-use and when-to-repeat guidance: call again immediately with after_seq after a timeout, use respond_to_call_event for response_required events, and stop on terminal events. It also names the alternative tool needed to answer events.

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