Skip to main content
Glama

update_number_routing

Idempotent

Set or clear a number's voice_callback_url (returns voice actions on inbound calls), events_url (receives call lifecycle events), inbound_agent (bind a published AI agent to answer inbound calls, always or after hours, and choose where it hands a caller off — handover_forward, handover_voicemail, or handover_callback_url, in that precedence order; clear_inbound_agent removes the binding), forward (reusable ring-one-or-more-destinations target; clear_forward removes it), voicemail (reusable greeting + recording-limit config; clear_voicemail removes it), queue (hold callers in a line, announce position, ring a pool one caller at a time — outranks forward and voicemail; clear_queue removes it), hours (this number's own opening hours, a public-holiday opt-in, and what a caller hears outside them — when the number is CLOSED the hours.closed treatment answers INSTEAD of queue/forward/voicemail; clear_hours removes them and the number is always open again), and outbound_mode (how calls placed FROM this number route: "server" default or "connect" to auto-bridge the destination directly; clear_outbound_mode resets it). Validate voice-action documents with validate_voice_actions before wiring them here. ATTACHING A RECORDING: every *_play_url field (voicemail.greeting_play_url, queue.greeting_play_url, queue.hold_play_url, and the same fields on nested voicemail/forward blocks) needs a URL Sautikit hosts. Uploading is NOT available as a tool — it moves binary files, which the Model Context Protocol carries poorly. Use the REST endpoint directly: POST /v1/uploads/audio (multipart/form-data, single file field, mp3 or wav, max 10 MiB, same API key, needs the numbers.claim scope) and pass the url it returns. A stored URL is re-signed automatically on every call, so it keeps playing indefinitely — never re-upload just because it looks presigned.

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": {
      "number_id": "<number_id>"
    },
    "name": "update_number_routing"
  }
}

Input Schema

NameRequiredDescriptionDefault
hoursNoset/replace this number's opening hours. Fields: enabled, timezone (IANA, e.g. Africa/Nairobi — defaults to the workspace's), weekly (array of {days: 0=Sunday..6=Saturday, start "HH:MM", end "HH:MM"}; end BEFORE start means the window runs past midnight), exceptions (array of {date "YYYY-MM-DD", closed, start, end, name} — single dates that outrank both the holiday calendar and weekly), observe_holidays (use the workspace public-holiday calendar), closed (what a caller hears outside the windows: {mode: say|voicemail|forward|agent|server, plus say/say_voice or play_url, or voicemail, or forward, or agent_id}). closed.mode="agent" must also say where the caller goes when the agent hands the call back: handover_queue, handover_forward, handover_voicemail or handover_callback_url — same shapes as the inbound_agent fields of those names, and at least one is required unless the number's inbound_agent binding already carries one (a closed agent with no handover target drops the caller at the end of the conversation). Whichever of the four closed sets overrides the binding's. Precedence: exception, then holiday, then weekly. A number with no hours is always open. QUEUE IS NOT A CLOSED MODE. Cannot be combined with inbound_agent.mode="after_hours" — bind the agent as closed.mode="agent" instead.
queueNoset/replace the Queue routing mode: hold callers in an ordered line, announce their position, and hand the caller at the head to a pool until someone answers. Fields: enabled, agents (a forward-target — a 4-digit destination is an extension and rings the device registered to it), greeting_text or greeting_play_url, hold_play_url + hold_duration_seconds (both *_play_url values must be URLs we host — upload via POST /v1/uploads/audio first, there is no upload tool), announce_position, announce_every_seconds (default 90), tick_seconds (default 30), max_wait_seconds (0 = hold as long as the caller likes — the default), max_depth (default 25), on_timeout (hangup|voicemail|forward) plus voicemail/overflow_forward for the chosen exit. Queue OUTRANKS forward and voicemail when enabled. There is no limit on how long a caller can wait; on_timeout applies only when max_wait_seconds is set.
forwardNoset/replace the reusable forward-target (destinations, sequential, first_answer_wins, ring_timeout, caller_id, voicemail) for this number; omit to leave it untouched
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.
number_idYestenant number UUID
voicemailNoset/replace the reusable voicemail config (greeting_text or greeting_play_url, max_length, beep) for this number; omit to leave it untouched. greeting_play_url must be a URL we host — upload the audio via POST /v1/uploads/audio first (no tool: MCP carries binaries poorly)
events_urlNoURL Sautikit POSTs call lifecycle events to; empty string clears it
clear_hoursNoset true to remove opening hours from this number, making it always open (mutually exclusive with hours)
clear_queueNoset true to remove the queue from this number (mutually exclusive with queue)
clear_forwardNoset true to remove the forward target from this number (mutually exclusive with forward)
inbound_agentNoset/replace the AI-agent binding for inbound calls to this number; omit to leave the current binding untouched
outbound_modeNohow calls placed FROM this number route on the outbound edge: "server" (default — use voice_callback_url when set, else auto-bridge the destination) or "connect" (auto-bridge the destination directly, ignoring voice_callback_url on outbound)
clear_voicemailNoset true to remove the voicemail config from this number (mutually exclusive with voicemail)
clear_events_urlNoset true to clear the events URL
voice_callback_urlNoURL Sautikit fetches voice actions from when this number receives a call; empty string clears it
clear_inbound_agentNoset true to remove the AI-agent binding from this number (mutually exclusive with inbound_agent)
clear_outbound_modeNoset true to reset outbound_mode to the server default
clear_voice_callback_urlNoset true to clear the voice callback URL

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare idempotent and non-destructive behavior, but the description adds substantial context: precedence rules, deprecation of after_hours, queue outranking forward/voicemail, closed hours overriding other treatments, handover precedence, upload constraints, and URL re-signing. It does not contradict the annotations.

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

Conciseness3/5

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

The description is front-loaded with purpose and contains little obvious filler, but it is a dense wall of text with many parentheticals. For an 18-parameter tool it is comprehensive, yet it could be structured more readably with bullets or sections.

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 complex 18-parameter nested configuration tool with no output schema, the description covers all routing modes, clearing flags, precedence, deprecation, validation, and the audio-upload workaround. An agent has enough context to invoke it correctly.

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?

Schema description coverage is 100%, so the schema already documents all 18 parameters in detail. The description reinforces cross-parameter precedence and clearing semantics, but most individual parameter meaning is already present in the structured schema, so it adds only marginal value beyond it.

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?

The description opens with a specific verb ('Set or clear') and enumerates the exact routing resources it controls: voice_callback_url, events_url, inbound_agent, forward, voicemail, queue, hours, and outbound_mode. It clearly distinguishes this as the number-routing configuration tool and points to validate_voice_actions for related validation.

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?

It gives explicit when-not rules, such as hours cannot combine with inbound_agent.mode='after_hours', queue is not a closed mode, and clear_* flags are mutually exclusive with their set counterparts. It also names alternatives and preconditions: bind the agent as hours.closed mode='agent', validate voice actions before wiring, and upload audio via REST because no upload tool exists.

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