Skip to main content
Glama

Set calls and SMS number routing

set_voice_sms_number_routing
DestructiveIdempotent

Set where incoming calls to an active calls and SMS number go. mode agent (with agentId): an agent that runs on volai's own voice engine answers. An agent can be attached only to an active number (a number that is awaiting_registration, rejected or being released returns invalid_transition) and only an agent on the volai engine (otherwise unsupported_for_number_type); if the agent has a transfer number, it must be a number this line may call (+420 for a Prague number, otherwise see capabilities.outboundTo of the number), or destination_not_allowed is returned and nothing is changed. mode none: calls are not answered (this disconnects the agent and works in any status of the number). mode forward (forwardTo = your phone in international format): the operator forwards the call to your phone and no agent answers. mode sip (sipUri = your SIP server as host or host:port, optional sipUsername and sipPassword together): the call goes to your own PBX. forward and sip are available only when volai has enabled them for your account; otherwise the call fails with unsupported_for_number_type and nothing changes. forward is allowed only to ordinary landline or mobile numbers in the countries the number may call (see capabilities.outboundTo), never to premium lines or to volai numbers (destination_not_allowed or invalid_number); a malformed SIP address returns invalid_sip_uri and a change the operator did not accept returns routing_failed. Forwarded calls are billed per second from the operator's call records: the inbound minute rate plus, for forward, the outbound minute rate to the destination (see the pricing page; when the caller's number is outside the EEA, the outbound minute to a Czech phone can cost up to the separate higher rate of a call from a number outside the EEA to Czechia); sip bills only the inbound minute. Setting forward or sip needs a balance of at least the threshold at which a stopped service resumes (resumeAtBalanceHal, the error message states the amount) on an account that is not stopped for credit, otherwise insufficient_credit (top up first); with a monthly spending cap that is reached, forward returns spend_cap_reached and so does sip unless the cap lets inbound calls through (inboundAboveCap); nothing changes. A forwarded number stops ringing your phone or PBX by itself when the balance drops below zero or the cap is reached (sip keeps ringing at the cap when inboundAboveCap is on) and comes back on its own after a top-up or a higher cap. Switching back to agent or none always works. While the number is being processed (an activation, billing or a release) the call returns in_progress: nothing was changed, try again in a minute. Calls from the number are placed with make_call and agentId, SMS with send_sms and fromNumber. Same data as PATCH /v1/voice-sms-numbers/{e164} (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": {
      "e164": "<e164>",
      "mode": "<mode>"
    },
    "name": "set_voice_sms_number_routing"
  }
}

Input Schema

NameRequiredDescriptionDefault
e164YesCalls and SMS number to configure, in E.164 format with the country code, for example +420292000001. Must belong to this account, from list_voice_sms_numbers.
modeYesWhere calls to this number go: agent (needs agentId), none (not answered, agent disconnected), forward (needs forwardTo) or sip (needs sipUri). forward and sip may be off for the account.
sipUriNoYour SIP server as host or host:port, required when mode is sip. The call goes to your own PBX and no agent answers.
agentIdNoId of the agent that should answer calls to this number, from list_agents. Required when mode is agent, ignored otherwise.
forwardToNoYour phone in international format (+ or 00 prefix), required when mode is forward. Ordinary landline or mobile numbers only, never a premium line or a volai number.
sipPasswordNoDigest password of your SIP server, for mode sip. Send it with sipUsername. Omitted, or empty with the unchanged sipUsername, it keeps the stored password if the sipUri host and port stay the same, else invalid_sip_uri. Both fields empty remove the login. Never returned.
sipUsernameNoDigest username of your SIP server, for mode sip. Send it together with sipPassword. Omitting both on the same server keeps the saved login; an empty sipUsername together with an empty sipPassword removes it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations flag destruction and idempotency, and the description goes far beyond them: which transitions are rejected, that nothing changes on failure, billing per second by mode, balance thresholds, spend-cap and auto-restore behavior, and the in_progress retry state. This is exactly the behavioral context an agent needs before a destructive mutation.

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 purpose is front-loaded, but the body is a dense wall of error codes and billing rules packed into a few long sentences with nested parentheticals. It is information-rich yet hard to scan; some error-code enumeration could be tightened.

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 destructive, multi-mode routing mutation with no output schema, the description covers preconditions, failure modes, billing, credit gating, and retry behavior. An agent has essentially everything needed to call it correctly.

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 already 100%, so the baseline is 3, but the description adds value the schema does not: the consequences of each mode choice, when forwardTo must be a landline versus a volai number, and the sipUsername/sipPassword pairing and password-retention semantics. The added meaning is real but partially duplicates schema prose.

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

Purpose4/5

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

States a specific verb and resource: 'Set where incoming calls to an active calls and SMS number go.' The four modes are enumerated clearly. It does not explicitly distinguish itself from siblings like set_number_routing or set_callback_routing, so an agent must infer the difference from the naming.

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?

Rich conditional guidance: which mode applies, preconditions such as the number being active and the agent being on volai's engine, and account capability requirements for forward/sip. It gives when-to-use context per mode, though it never names an alternative tool to use instead for non-voice/SMS routing.

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.