Skip to main content
Glama

Set who answers a number (number rules)

update_number_rules
Destructive

Set who answers calls to this phone number (its Number rules), the same as Save routing under "When someone calls this number" in the workspace. Send incoming.when_called with what that choice needs: answer_with_skysay_agent and agent_id, an AI agent in the number's workspace and project; send_to_my_phone_server and phone_server_id, a verified phone server of the workspace; forward_to_phone_number and phone_number, the E.164 number calls are forwarded to; or disabled, so calls are not answered. The same tool sets outgoing (caller ID use, allowed agents and countries, concurrent calls) and recording. A field you leave out keeps its saved value. Needs numbers:write. list_numbers shows each number's when_called; get_number_rules reads one number's rules.

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_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
incomingNoWho answers calls to this number.
outgoingNoHow the number may be used for outgoing calls.
number_idYes
recordingNoRecording rules: enabled, consent_state, retention_days.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • addedInput schema / properties / incoming / description
      Added value: +"Who answers calls to this number."
    • addedInput schema / properties / incoming / properties / agent_endpoint_id / description
      Added value: +"The agent endpoint that answers, for answer_with_skysay_agent, used only when no agent_id is sent, saved in the rules or bound to the number. To switch a number to another AI agent, send that agent's agent_id."
    • addedInput schema / properties / incoming / properties / agent_id / description
      Added value: +"The AI agent that answers, for answer_with_skysay_agent. It must be in the number's workspace and project."
    • addedInput schema / properties / incoming / properties / phone_number / description
      Added value: +"The phone number calls are forwarded to, in E.164 (+ and digits), for forward_to_phone_number."
    • addedInput schema / properties / incoming / properties / phone_server_id / description
      Added value: +"The verified phone server calls are sent to, for send_to_my_phone_server."
    • addedInput schema / properties / incoming / properties / when_called / description
      Added value: +"What happens when someone calls this number: answer_with_skysay_agent (an AI agent answers; needs agent_id), send_to_my_phone_server (needs phone_server_id), forward_to_phone_number (needs phone_number) or disabled (calls are not answered)."
    • addedInput schema / properties / outgoing / description
      Added value: +"How the number may be used for outgoing calls."
    • addedInput schema / properties / outgoing / properties / allowed_agents / description
      Added value: +"AI agent ids that may call from this number; empty allows any agent of the workspace."
    • addedInput schema / properties / outgoing / properties / allowed_countries / description
      Added value: +"Destination country codes this number may call, e.g. [\"US\", \"EE\"]; empty allows any the workspace may call."
    • addedInput schema / properties / outgoing / properties / can_be_used_as_caller_id / description
      Added value: +"Whether outgoing calls may show this number."
    • addedInput schema / properties / outgoing / properties / max_concurrent_calls / description
      Added value: +"The most outgoing calls from this number at the same time; 0 means no number-level limit."
    • addedInput schema / properties / recording / description
      Added value: +"Recording rules: enabled, consent_state, retention_days."
  2. Changed1 schema field changed
    • changedInput schema / properties / incoming / properties / when_called / enum
      Previous value: -[
      -  "answer_with_skysay_agent",
      -  "send_live_audio_to_my_app",
      -  "send_to_my_phone_server",
      -  "forward_to_phone_number",
      -  "disabled"
      -]New value: +[
      +  "answer_with_skysay_agent",
      +  "send_to_my_phone_server",
      +  "forward_to_phone_number",
      +  "disabled"
      +]
  3. Changed1 schema field changed
    • removedInput schema / properties / incoming / properties / fallback
      Removed value: -{
      -  "type": "object"
      -}
  4. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations it discloses the write permission needed and, importantly, partial-update semantics ('A field you leave out keeps its saved value'), which is the key risk of misusing a destructive write. It does not spell out that the previous routing choice is replaced when when_called is sent, so the destructiveHint is not fully explained.

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?

The first sentence front-loads purpose and the enumeration of when_called options is easy to scan. The UI reference ('the same as Save routing under "When someone calls this number" in the workspace') is contextual noise that could be cut.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nested, destructive write tool, it covers incoming routing well but only name-drops outgoing and recording; the recording object has no property-level detail anywhere, so an agent cannot form a valid recording payload from the description. No output schema exists, which is acceptable for a setter, but the recording gap is real.

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?

The description explains the when_called choice and its companion fields, but the schema already carries that pairing, and agent_endpoint_id, outgoing fields, and recording internals are not elaborated beyond field names. At 75% schema coverage the description largely restates structured data rather than adding meaning.

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?

Names a specific verb (Set) and resource (who answers calls to this phone number / Number rules), then broadens scope explicitly to outgoing caller-ID/limits and recording. It is clearly a writer of number rules, distinct from the read siblings get_number_rules and list_numbers.

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?

States the required permission (numbers:write) and routes the agent to the read alternatives by role: list_numbers shows when_called, get_number_rules reads a single number's rules. It does not explicitly say 'do not use this for reading', but the routing is implicit in how those siblings are described.

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.