Skip to main content
Glama
hail-hq

hail

Official

Route a number to an agent

route_number
Idempotent

Choose which agent answers a number's calls and texts.

Instructions

Choose which agent answers a number's calls and texts.

    ``voice_agent_id`` makes the number answer calls with that agent
    (Hail registers it for inbound at the carrier and LiveKit);
    ``clear_voice=True`` stops answering calls. ``sms_agent_id`` makes
    the agent reply to texts; ``clear_sms=True`` stops that. A field
    left out keeps its value. ``number_id`` comes from GET /numbers.

    Returns the updated ``PhoneNumberResponse`` as a dict, or
    ``{"error": "<message>"}``.
    

Input Schema

NameRequiredDescriptionDefault
clear_smsNo
number_idYes
clear_voiceNo
sms_agent_idNo
voice_agent_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare idempotent=true and destructiveHint=false, but the description adds real context beyond them: Hail registers the agent at the carrier and LiveKit, and clear_voice/clear_sms stop answering/reply behavior. This exposes the external side effects of the mutation. It omits permission or failure-mode details, which keeps it from a 5.

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 purpose sentence is front-loaded, and the parameter walkthrough is compact and ordered. The parenthetical about carrier/LiveKit registration is slightly verbose but carries real information, so there is little waste.

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

Completeness4/5

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

With idempotency and non-destructiveness in annotations and an output schema present, the description supplies the mutation semantics and the error shape ({'error': ...}) an agent needs. The remaining gap is the conflict behavior when both set and clear flags are provided on the same channel.

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 description coverage is 0%, so the description carries the full burden, and it covers all five parameters with concrete meaning: voice_agent_id assigns answering, clear_voice stops answering, sms_agent_id assigns texting, clear_sms stops it, and number_id is sourced from GET /numbers. It doesn't address what happens if voice_agent_id and clear_voice are set together, which is the main remaining gap.

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 opening sentence names a specific verb and resource: choosing which agent answers a number's calls and texts. It clearly separates this from read-only siblings like get_number or list_numbers, so an agent can identify it without opening the schema.

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?

It explains the operational semantics for each mode (assign vs. clear) and the crucial partial-update rule: 'A field left out keeps its value.' It also gives provenance for number_id ('comes from GET /numbers'). It stops short of naming explicit when-not conditions or alternatives, but the context for use is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.