Skip to main content
Glama
hail

hail

Official

Hail

Give your agent a real phone number and an email inbox — in minutes, not days.

License: AGPL v3 PyPI — hail-sdk CLI release Docs Brand assets

Run in Postman Hail skill review on Tessl

Your agent needs to call a person to move an appointment. Hail connects to the telephone carrier and runs the voice pipeline — STT, TTS, turn detection. Your agent is the brain: point Hail at any OpenAI-compatible endpoint (bring your own LLM), or let Hail's fallback chain (Anthropic → OpenAI → Gemini) do the talking. SMS and email work the same way — one MCP endpoint, one API key, one invoice.

Self-hostable with Docker Compose; LiveKit Cloud and the communication providers remain external. Open source under AGPLv3.

Animated terminal demo of hail tail streaming live call events

Vercel Chat SDK

Connect a bot to Hail SMS with @hail-hq/chat-sdk-adapter. Receive signed webhooks and reply from your Hail number with thread.post(). The adapter currently supports SMS; Hail email and phone calls remain available through the Hail APIs.

See the setup guide, adapter source, and release announcement.

Related MCP server: agentline-mcp

Self-host quick start

Prerequisites: Git, Docker Engine, and Docker Compose v2. For a public production deployment you also need a domain, HTTPS, and a managed Postgres; start with the VM deployment guide.

The commands below run a local evaluation stack with bundled Postgres. Voice calls additionally require LiveKit Cloud, a carrier (Twilio, Telnyx or DIDWW), Deepgram, Cartesia, and at least one LLM provider. Email is optional and requires AWS SES.

git clone https://github.com/hail-hq/hail
cd hail
cp .env.example .env

# Generate a shared self-host key, then put it in .env as HAIL_API_KEY.
printf 'hk_%s\n' "$(openssl rand -base64 32 | tr -d '/+=' | head -c 40)"

# Edit .env and add the providers required for the channels you will use.
docker compose -f docker-compose.yml -f docker-compose.local.yml \
  run --rm api alembic upgrade head
docker compose -f docker-compose.yml -f docker-compose.local.yml up -d
docker compose -f docker-compose.yml -f docker-compose.local.yml ps
curl --fail http://localhost:8080/healthz

Self-host authentication uses the HAIL_API_KEY value from .env; it does not need an API-key row in Postgres. Export the same key and API URL in the shell where you use the CLI or SDK (Compose does not export .env into your shell):

export HAIL_API_URL=http://localhost:8080
export HAIL_API_KEY='<same value as .env>'

Next, follow LiveKit Cloud and Twilio (optionally Telnyx and DIDWW), then bind a phone number to the self-host organization using the first-run setup. To enable email, follow AWS SES.

Authentication differs by deployment:

  • Hail Cloud (managed, at hail.so): run hail login. The device flow writes a key to ~/.hail/credentials.json.

  • Self-host: do not run hail login; set HAIL_API_URL and HAIL_API_KEY as shown above, or pass --api-url and --api-key.

Full setup guides: self-hosting · Webhooks · MCP · operations

Cursor plugin

Give your AI a real phone number and an email inbox.

Let your assistant handle calls, texts, and email. Building an app? Add AI calls, email and SMS with one API.

Handle calls, texts, and email from Cursor, and check conversation history. Get phone numbers in 120+ countries, with help for local rules and required documents, including US A2P 10DLC registration. Choose a built-in voice or bring your own. Build with the API, CLI, or Python SDK. Open-source or cloud priced on usage.

From a checkout that includes the plugin, copy its files into Cursor's local plugin directory:

mkdir -p ~/.cursor/plugins/local/hail
git archive HEAD .cursor-plugin mcp.json README.md LICENSE \
  docs/assets/hail-messenger.svg | tar -x -C ~/.cursor/plugins/local/hail

Reload Cursor and open Customize to find the Hail MCP server. Enterprise administrators must allow local plugin imports first. The plugin connects to https://mcp.hail.so using OAuth. Sign in to Hail when Cursor asks. No API key or local MCP runtime is needed. Start with a read-only request:

Find call-capable Hail numbers in the UK, France, and Canada. Compare
monthly fees, setup fees, and registration requirements.

Install the CLI

On macOS or Linux with Homebrew:

brew install hail-hq/tap/hail
hail version

Homebrew adds the hail-hq/tap tap automatically. To update later:

brew upgrade hail-hq/tap/hail

Alternatively, download the archive for your operating system and architecture from GitHub Releases. Release binaries are available for macOS and Linux on Intel and ARM64. See the CLI reference for authentication and commands.

Make your first call

CLI:

hail login                        # Hail Cloud only (device flow)
hail auth logout                  # remove local credentials
hail auth token                   # print bare API key for scripting

hail call +14155550100 --prompt "be brief" --recipient-consent
hail call list
hail call status <id>             # one call's state
hail call tail <id>               # follow events for one call

hail sms +15551234567 --body "Hello!" --recipient-consent
hail sms list
hail sms status <id>
hail sms suppressions list        # opt-out list
hail sms sender-id get            # custom sender ID

hail numbers acquire              # dedicated phone number (voice + SMS), cheapest live offer
hail numbers list
hail contacts list                # org contact directory

hail email send --to a@b.com --subject hi --body "hello" --recipient-consent
hail email list
hail email get <id>
hail email tail <id>              # follow events for one email
hail email raw <id>               # RFC 5322 source
hail email suppressions list      # addresses Hail will not send to
hail email attachment <id> <att-id> --output file.pdf
hail email domain register --kind hail_mail
hail email domain register --kind custom --domain acme.com  # send + receive on your own domain
hail email domain list

printf '%s' "$YOUR_API_KEY" | hail providers set llm \
  --provider openai-compatible \
  --base-url https://api.your-agent.dev/v1 \
  --model your-model \
  --key -                         # standing BYO brain (also: tts, stt)

hail tail                         # cross-channel event stream
hail tail call:<id>               # narrow by resource type

hail mcp endpoint                 # Streamable HTTP URL for the MCP server
hail completion zsh               # source <(hail completion zsh)
hail version

Python (pip install hail-sdk):

import asyncio
from hail import Client

async def main():
    async with Client() as client:  # reads $HAIL_API_KEY
        call = await client.calls.create(
            to="+15551234567",
            recipient_consent=True,
            system_prompt="You are calling to confirm a reschedule.",
        )
        async for event in client.events.tail(id=f"call:{call.id}"):
            print(event.kind, event.payload)

asyncio.run(main())

HTTP (OpenAPI spec, API reference):

curl -X POST http://localhost:8080/v1/calls \
  -H "Authorization: Bearer $HAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"+15551234567","recipient_consent":true,"system_prompt":"..."}'

MCP (Claude.ai, Claude Code, ChatGPT, Cursor, …): local clients can use http://localhost:8081. Web-based clients require a publicly reachable HTTPS endpoint. See the MCP setup guide.

Bring your own LLM

Hail always runs the telephony and the voice pipeline. The brain is pluggable, at two levels:

  • Per call — pass an llm block to POST /calls; different brains for different calls.

  • Standing — save an endpoint once (hail providers set llm …); every call your org places uses it.

Any OpenAI chat-completions-compatible endpoint works. A complete runnable example lives in docs/public/byo-llm.md. TTS and STT are pluggable the same way (hail providers set tts|stt …).

Tenets

  1. Clear comms. Explicit OpenAPI contracts. No hidden behavior.

  2. Simple code. Boring is best. No abstraction before it has two uses.

  3. Brief docs. Each page fits on one screen. Setup takes 10 minutes from a fresh clone.

  4. Self-hostable. Docker Compose runs Hail's API, voicebot, MCP server, and Postgres; LiveKit Cloud and channel providers remain external.

  5. Pluggable brain. BYO LLM endpoint, or Hail's bundled fallback. The voice pipeline and transport are always Hail's.

  6. Agent-first docs. AI agents are first-class readers. Runnable examples first; links to canonical sources, not paraphrase.

Milestones

A checked box is a released feature. Per-artifact changelogs (GitHub Releases for the CLI, PyPI notes for the SDK) record which version shipped it.

Phone calls

  • Outbound

    • Twilio

    • Telnyx

    • DIDWW

  • Inbound (answered by an agent)

    • Twilio

    • Telnyx

    • DIDWW

SMS

  • Outbound

    • Twilio

    • Telnyx

  • Inbound

    • Twilio

    • Telnyx

    • Answered by an agent

Numbers

  • Live quotes across carriers (inventory, price, verification effort)

  • Carrier verification for regulated countries (Twilio, Telnyx)

Email

  • Outbound

    • AWS SES

    • Custom sender domains (own DNS, automatic DKIM + MAIL FROM)

  • Inbound

    • AWS SES

    • Custom domains (receive on verified domains)

Voice pipeline

  • Languages

    • 39 call languages with automatic STT routing and per-language turn detection — see docs/languages.md

  • STT

    • Deepgram

    • Speechmatics

    • Whisper

    • AssemblyAI

  • TTS

    • Cartesia

    • ElevenLabs

    • Deepgram Aura

  • VAD

    • Silero

  • Turn detection

    • LiveKit turn-detector

  • LLM — system-prompt mode

    • Fallback: Anthropic → OpenAI → Gemini, fast models

  • LLM — BYO-endpoint mode

    • OpenAI chat-completions-compatible (docs)

  • Recording

    • Optional call recording

    • Diarization

Distribution

  • API

  • CLI

    • hail binary via GitHub Releases

  • MCP server

    • Remote Streamable HTTP endpoint included with each Hail deployment

    • Stdio entry point included in the MCP container; see MCP setup

  • Python SDK

    • hail-sdk on PyPI, imports as hail

Infrastructure

  • Docker Compose scaffold

  • Self-hosted LiveKit SFU

    • docker compose integration

Architecture

The path of an outbound call:

AI agent ──► Hail API ──dispatch──► Voicebot ──► LiveKit Cloud ──SIP──► carrier (Twilio · Telnyx · DIDWW) ──► 📞

Full diagram and service breakdown: docs/public/architecture.md. All docs are published at hail.so/docs and live as plain markdown in docs/public/.

Contributing

See docs/public/contributing.md. Short version: fork, branch, conventional commits, pull request. Provider adapters go in core/hailhq/core/providers/; new env vars update .env.example in the same commit.

License

Code: AGPL-3.0-or-later — run a modified Hail as a service, release your source. Pricing dataset (costs/): CC-BY-4.0 — use the JSON with attribution.

Available Tools

46 tools
acquire_numberBuy a phone numberA
DestructiveIdempotent
Inspect

Buy a quoted phone number with explicit price confirmation.

    This charges the setup fee and first month immediately, then renews monthly.
    The purchase requires the user's authorization for that number and cost.
    Expired or changed offers return 409 without authorizing a different price.
    Each quote can buy at most one number.

    A retry with the same quote and ``idempotency_key`` refers to the original purchase.
    After a timeout, a new quote starts a different purchase and can buy a second number.
    A returned retry key is available after a timeout or server error.
    A 4xx failure returns no retry key; that failed request cannot be reused.
    A rejected or ambiguous registration selection returns 422.
    A purchase does not assign an answering agent automatically.
    Returns the number record and ``idempotency_key``, or an error with any available retry key.
    

Inputs: quote_id (required), number_type (required), country_code (required), confirm_total_cents (required), +3 more. Returns: object

amend_sms_applicationCorrect an existing SMS applicationA
DestructiveIdempotent
Inspect

Correct an existing SMS registration at the needs_information step.

    The address must be accurate; saved details can be reused when still correct.
    Identity changes are rejected. This operation does not create a replacement brand.
    Actual consent evidence is required; ``create_file_upload`` with purpose
    ``sms_evidence`` returns a public evidence link.
    Limits are 100 fields and 64 KiB of combined fields and address. No documents are uploaded.
    A later campaign filing can incur the normal review fee.
    After a timeout, the existing registration can already reflect the correction.
    Returns the updated registration or an error.

Inputs: fields (required), verification_id (required), attest_authorized (required), address. Returns: object

cancel_verificationCancel a verificationA
Destructive
Inspect

Cancel an eligible carrier registration after explicit user authorization.

    Awaiting-review drafts are discarded; rejected registrations are dismissed.
    A rejected registration must be dismissed before a new one is submitted
    for the same country and number type.
    An approved US SMS registration can be cancelled: attached numbers lose US texting eligibility
    and its monthly fee ends after the current month.
    Some registrations have a minimum of three monthly fees even after early cancellation.
    Submitting or submitted registrations normally return 409; an accepted SMS campaign
    at runtime_setup is an exception.
    An SMS application at needs_information supports correction on its existing paid identity.
    Returns the cancelled registration or an error.

Inputs: verification_id (required). Returns: object

check_verificationCheck a verificationA
Read-onlyIdempotent
Inspect

Check a carrier registration form without filing anything.

    This preflight uses the intended registration and its supporting documents
    to check the carrier's current requirements, available credit and duplicate
    registrations. Uploads must belong to this workspace and be less than an hour old.
    Nothing is filed, saved, held or charged, and uploads stay usable.
    Returns ``ok``, ``files`` (slot, upload_id, size_bytes, sha256 per file) and
    ``note``; problems come back as ``problems`` with the field named.
    The carrier runs its own checks at submission.

Inputs: files (required), fields (required), documents (required), number_type (required), +6 more. Returns: object

check_verification_documentsRead verification documentsAInspect

Read the files of a number verification form, before the form is filled or submitted.

    This applies to a number offer, using the same quote and applicant type
    as the requirements. Known ``fields`` and ``address`` values can be partial.
    An AI model reads each file.
    Returns ``fields``, ``address`` and ``documents.<slot>.fields``: the values the
    files show, by the form's own keys, to fill the form after the user confirms
    them. ``documents.<slot>.option`` is the document type the file looks like.
    ``warnings`` (``field``, ``kind``, ``message``) lists what the carrier may
    refuse: an unreadable, upside-down or expired document, a file of another
    type than the chosen one, or a typed name that differs from the printed one.
    Each message names the fix. A submission with warnings is still accepted.
    A file nothing was read from has ``read`` false; an unclear file also has an
    ``unreadable`` warning, and a file past the daily reads has ``skipped``
    ``daily_limit``. Only the first 3 pages of a PDF are read; a PDF of more
    than 5 pages is not read.
    Each file read uses one of the workspace's daily document reads (30 per day);
    a file given for several slots uses one. Nothing is filed, saved, held or
    charged, and uploads stay usable.

Inputs: files (required), fields (required), documents (required), number_type (required), +4 more. Returns: object

confirm_verificationConfirm a verification with a codeAInspect

Confirm a registration using the code the carrier sent to the applicant.

    Incorrect or expired codes return a field error; the carrier can send a replacement after a day.
    Success advances the registration but does not guarantee immediate approval.
    A ``confirmation="reply"`` registration requires a direct reply to the carrier's text instead.
    Returns the updated registration or an error.

Inputs: code (required), verification_id (required). Returns: object

create_agentCreate an agentAInspect

Save an agent for calls, texts, and email replies.

The saved instructions and enabled channels apply when a number or email address routes to this agent. Saving the agent does not change existing routing. The call agent can hand over to listed contacts without seeing their phone numbers.

Without a voice override, the built-in providers use the deployment's configured voice. A workspace provider uses its configured voice or its own default. An omitted language uses the speech providers' defaults (English). Without a tool list, the workspace's channels determine the available tools. The workspace call limit applies unless overridden, and the handover limit defaults to 30 minutes from the contact answering.

Inputs: name (required), system_prompt (required), tools, language, +12 more. Returns: object

create_contactCreate a contactAInspect

Save a manually managed contact for calls, texts or email.

The contact appears in workspace contact searches and can be selected for call handover if it has a phone number. A duplicate phone or email returns 409.

Inputs: name (required), email, phone_e164. Returns: object

create_file_uploadCreate a file upload linkAInspect

Create a one-time link that uploads one file from a shell with curl.

    The bytes go from the local disk to Hail directly, not through the tool call,
    so any file that is not tiny goes this way.
    An email attachment can be up to 25 MB. A verification document must be
    JPG, PNG or PDF, up to 10 MB, and is usable for 1 hour after the upload.
    SMS evidence must be a JPG, PNG or PDF of the given ``content_type``, up to 10 MB.
    Its upload response has a public ``url`` for an ``*_evidence_url`` field.
    Carrier reviewers open it without signing in, so remove personal information first.
    Returns ``id``, ``upload_url``, ``expires_at`` (15 minutes), ``max_bytes``
    and a ready ``curl`` line with a ``'FILE_PATH'`` placeholder for the
    file's absolute path.
    The link needs no key and works once. The upload response holds
    ``size_bytes`` and ``sha256`` to compare with the local file.

Inputs: purpose (required), filename (required), content_type (required). Returns: object

delete_agentDelete an agentA
DestructiveIdempotent
Inspect

Permanently delete a saved agent after explicit user authorization.

    A mismatched ``confirm_name`` returns an error without deleting anything.
    Numbers assigned to the deleted agent stop answering calls with it;
    texts are delivered to webhooks only.
    Pausing an agent is a separate non-deleting status change.
    Returns ``deleted``, ``agent_id`` and ``name``, or an error.

Inputs: agent_id (required), confirm_name (required). Returns: object

get_agentGet an agentA
Read-onlyIdempotent
Inspect

Read one saved workspace agent by ID.

Returns its name, instructions, greeting, disclosure, voice settings, enabled channels, status, limits and other saved settings, or an error.

Inputs: agent_id (required). Returns: object

get_callGet a callA
Read-onlyIdempotent
Inspect

Read a call's current status, timing and transcript by ID.

Returns the call record with its transcript (spoken turns, in the order they were said), or an error when the call is unavailable.

Inputs: call_id (required). Returns: object

get_emailGet an emailA
Read-onlyIdempotent
Inspect

Read a complete workspace email by ID.

    Returns ``body_text``, ``body_html`` and other email fields.
    Inbound records include reply headers and spam, virus, SPF, DKIM and DMARC verdicts.
    Attachments include IDs and file metadata.
    An unknown or inaccessible email returns an error.

Inputs: email_id (required). Returns: object

get_email_attachmentGet an email attachmentA
Read-onlyIdempotent
Inspect

Return a temporary download URL for an inbound email attachment.

    The URL expires after approximately five minutes and requires no authorization header.
    Returns ``url``, or an error for an unavailable attachment.

Inputs: email_id (required), attachment_id (required). Returns: object

get_email_eventsGet email eventsA
Read-onlyIdempotent
Inspect

Read one email's delivery and engagement timeline.

    Events include sent, delivered, delivery_delayed, bounced, complained,
    rejected, opened and clicked, with ``payload`` and ``occurred_at``.
    Open and click tracking requires an HTML email body. Delivery events
    are also available for plain-text email.

Inputs: email_id (required), limit, cursor. Returns: object

get_email_rawGet raw emailA
Read-onlyIdempotent
Inspect

Return a temporary download URL for an inbound email's original MIME source.

    The URL expires after approximately five minutes and requires no authorization header.
    Raw source is available only for inbound emails.
    Returns ``url``, or an error for an unavailable email.

Inputs: email_id (required). Returns: object

get_email_statsGet email statsA
Read-onlyIdempotent
Inspect

Read workspace email delivery counts, rates and time series.

    Without ``from_`` and ``to``, the range is the last seven days.
    Hourly ranges are limited to eight days; all ranges to 92 days.
    Returns ``from``, ``to``, ``bucket``, ``totals``, ``rates`` and ``series``.
    Rates are null when the sent count is zero.
    Open and click counts cover HTML emails only; plain-text emails lower these rates.
    An upstream failure returns an error.

Inputs: to, from_, bucket. Returns: object

get_eventsGet eventsA
Read-onlyIdempotent
Inspect

Read a page of workspace events or events for one resource.

    A call-specific response includes the current ``call_status``.
    Terminal call states are completed, failed, busy, no_answer and canceled.
    This is a snapshot for checking progress. ``call_status`` is null for
    workspace-wide results and for non-call resource filters.

Inputs: id, kind, limit, cursor. Returns: object

get_numberGet a numberB
Read-onlyIdempotent
Inspect

Read a workspace number's state, capabilities and assigned agents.

Returns the number record or an error.

Inputs: number_id (required). Returns: object

get_smsGet a text messageA
Read-onlyIdempotent
Inspect

Read a text message's current state by ID.

Returns the message record, including delivery status, or an error.

Inputs: sms_id (required). Returns: object

get_sms_applicationRead saved SMS applicationA
Read-onlyIdempotent
Inspect

Read saved answers for an existing workspace registration.

    Returns private applicant fields, address and available sender information.
    An older application without saved answers returns 404.
    A number registration (``purpose="number"``) returns its kept answers,
    ``documents`` and the kept ``files`` by name (without their bytes) until
    ``kept_until``; ``resubmit_verification`` files it again from them.
    This read can recover an existing sender's details but creates no brand and files no campaign.
    Corrections retain the existing registration and its paid identity.

Inputs: verification_id (required). Returns: object

get_verificationGet a verificationA
Read-onlyIdempotent
Inspect

Read one carrier registration's current state and reported next step.

    The carrier state refreshes at most once per minute. Review can take business days.
    ``step="needs_information"`` means the existing SMS application needs corrections;
    its saved applicant details and paid identity remain attached to the same registration.
    An approved registration can make matching number offers ready for purchase.
    Rejections include ``rejection_reason``.
    ``waiting_for_credit`` indicates a fee awaiting payment.
    ``credit_needed_cents`` is this registration's share of the additional credit needed.
    Returns the registration record or an error.

Inputs: verification_id (required). Returns: object

get_verification_requirementsGet verification requirementsA
Read-onlyIdempotent
Inspect

Read a carrier's current registration fields, documents and address requirements.

    The response's ``subject_types`` lists the applicant types the carrier accepts.
    US local SMS registration uses ``purpose="sms"``, country ``US`` and type ``local``.
    Toll-free verification uses ``purpose="sms"``, the number's country ``US`` or ``CA``,
    type ``toll_free`` and its owned ``number_id``. Each number needs its own verification.
    Applicant country and business tax status determine the registration route.
    The personal route is available to US or Canadian applicants without a business tax number.
    Local 10DLC fees apply at submission, carrier review and monthly after approval.
    Toll-free verification is free and sends no identity confirmation code.

    Returns ``required``, ``fields``, ``documents`` and ``address_required``.
    ``required=false`` means a registration submission is unnecessary and would fail.
    Fields and files require accurate information supplied by the authorized applicant.
    Choice fields accept comma-separated option keys within their ``min_choices`` and ``max_choices``.
    Field ``max_length`` uses UTF-16 code units; an emoji counts as two.
    Selected consent methods can require evidence even when shared fields are optional.
    No public link for an ``*_evidence_url`` field? Upload the screenshot with
    ``create_file_upload`` (purpose ``sms_evidence``) and use the ``url`` it returns.
    Document slots with ``needs_input=false`` require no upload.
    An upstream failure returns an error.

Inputs: number_type (required), country_code (required), subject_type (required), purpose, +2 more. Returns: object

list_agentsList agentsA
Read-onlyIdempotent
Inspect

List the workspace's saved agents and their settings.

    Agent records contain IDs, names, instructions, greetings, disclosure settings,
    voice settings, enabled channels, status, duration limits and handover contacts.
    Returns ``items`` or an error.

Inputs: no named parameters. Returns: object

list_callsList callsA
Read-onlyIdempotent
Inspect

List recent workspace calls, newest first.

    The list contains call summaries. ``get_call`` reads the full call and transcript.
    

Inputs: to, limit, cursor, status. Returns: object

list_contactsList contactsA
Read-onlyIdempotent
Inspect

List workspace members and manually saved contacts.

    A member entry carries a workspace role and a ``member:<user_id>`` ID.
    A manually saved contact has its own contact ID and no workspace role.
    Either kind can be selected for handover when it has a phone number.

Inputs: q, limit. Returns: object

list_email_domainsList email domainsA
Read-onlyIdempotent
Inspect

List the workspace's sending identities and default sender address.

    The listing helps select a sender for ``send_email``.
    Only identities with ``verification_status="verified"`` can send.
    For ``kind="custom"``, ``domain`` is a domain supporting any local part.
    For ``kind="hail_mail"``, it is already a complete email address.
    One verified custom domain takes priority over the Hail mail address.
    With several verified custom domains, ``default_from`` is null and email sending requires an explicit sender.
    A custom domain with ``sends_enabled`` false cannot send: it is skipped for picks and refuses an explicit ``from_``.
    Toggle it with PATCH ``/v1/email-domains/{id}`` (custom domains only).
    

Inputs: limit, cursor. Returns: object

list_emailsList emailsA
Read-onlyIdempotent
Inspect

List workspace email summaries, newest first.

    Summaries contain IDs and metadata. ``get_email`` reads the body of a
    specific message.

Inputs: limit, cursor, status, direction. Returns: object

list_number_regionsList number search regionsA
Read-onlyIdempotent
Inspect

List US state and Canadian province codes supported by number searches.

    Returns ``regions`` containing ``country_code``, ``code`` and ``name``.
    These codes identify the optional region filter for a city search.
    An upstream failure returns an error.

Inputs: no named parameters. Returns: object

list_numbersList phone numbersA
Read-onlyIdempotent
Inspect

List dedicated workspace phone numbers, newest first.

The records show capabilities, provisioning state and assigned agents, so they can be used to select an existing number for sending or routing.

Inputs: limit, cursor. Returns: object

list_smsList text messagesA
Read-onlyIdempotent
Inspect

List recent workspace text messages and their delivery states.

    A message ID in the results identifies the same record in ``get_sms``.

Inputs: to, limit, cursor, status. Returns: object

list_verificationsList verificationsA
Read-onlyIdempotent
Inspect

List workspace carrier registrations, newest first.

    Items include IDs, applicant names and types, country, number type, purpose,
    state, rejection details, timestamps, confirmation method and SMS progress fields.
    States are awaiting_review, submitting, submitted, approved, rejected or cancelled.
    SMS steps include confirm_identity, filing, carrier_review, needs_information and runtime_setup.
    ``campaign_accepted`` alone does not authorize texting: runtime readiness and number attachment are also required.
    ``identity_confirmed`` can carry over to a later filing for the same person.
    ``waiting_for_credit`` means a carrier fee prevents the next step.
    ``credit_needed_cents`` is that registration's share of the additional credit needed,
    or null when it is not waiting. Shares across waiting registrations are additive.
    ``confirmation="code"`` identifies a carrier-texted confirmation code.
    Returns ``items`` or an error.

Inputs: purpose. Returns: object

lookup_contactLook up a contactA
Read-onlyIdempotent
Inspect

Find workspace contacts by name, email or phone fragment.

Returns up to ten matches containing names, phone numbers, email addresses and IDs. Several matches can refer to different people.

Inputs: query (required). Returns: object

place_callPlace a phone callAInspect

Start an outbound AI phone call.

    With ``from_`` omitted, Hail uses the oldest active workspace number with
    voice capability, or a shared pool number when none is available.
    A dedicated number is not required. Shared pool numbers cannot be selected
    explicitly; an exhausted pool returns an ``error`` result without starting a call.
    The call uses instructions from ``system_prompt`` or a saved ``agent_id``,
    or a model endpoint supplied in ``llm``. At least one is required.
    US artificial-voice calls (47 CFR 64.1200(b)(1)) require the AI disclosure.
    Hail does not verify the lawful basis or the recipient's consent.
    A 4xx response returns no ``idempotency_key``.

    Returns the call ID, status, phone numbers and ``idempotency_key``, or an error.
    

Inputs: to (required), recipient_consent (required), llm, from_, +12 more. Returns: object

preview_sms_applicationPreview a US texting registrationA
Read-onlyIdempotent
Inspect

Preview local or toll-free SMS registration text without filing or charging.

    The response contains the description, consent flow and samples for user review before submission.
    Answers require actual applicant information and consent evidence.
    Evidence links can come from ``create_file_upload`` with purpose ``sms_evidence``.
    Field or length errors appear in ``problems``.
    Limits are 100 fields and 64 KiB of combined fields and address.
    A successful preview does not guarantee submission: duplicates, low credit or carrier checks can still prevent it.
    

Inputs: fields (required), subject_type (required), address, number_id. Returns: object

quote_numbersQuote phone numbersA
Read-onlyIdempotent
Inspect

Compare available phone numbers and their prices without buying or charging.

    Returns ``offers``, ``recommended_quote_id`` and ``expires_at``.
    Each offer includes ``e164``, ``number_type``, ``capabilities``, ``quote_id``,
    ``monthly_cents``, ``setup_cents``, ``readiness``, ``requirements``,
    ``subject_types``, ``verifications``, ``locality`` and ``region``.
    Prices are USD cents. ``locality`` and ``region`` tell apart cities with the same name.
    Quotes expire after ten minutes. Expired quotes cannot authorize a purchase.
    ``recommended_quote_id`` identifies a ready offer or is null when none is ready.

    ``subject_types`` identifies eligible personal or business registrations.
    ``verifications`` contains accepted registrations, with approved entries first.
    Entries include ``id``, ``state``, ``subject_type`` and ``subject_name``.
    ``readiness="verification_required"`` means registration approval is still needed.
    Registration requirements are specific to the quote and applicant type.
    An offer with ``by_request=true`` has no assigned number and requires a manual support order.
    Such offers remain valid for registration but are unavailable for automatic purchase.
    An upstream failure returns an error.

Inputs: country_code (required), city, region, area_code, +2 more. Returns: object

release_numberRelease a numberA
DestructiveIdempotent
Inspect

Permanently release a phone number after explicit user authorization.

    A mismatched ``confirm_e164`` returns an error without releasing anything.
    Calls and texts to a released number stop. Recovery is not guaranteed.
    Current and previous monthly fees remain due, without a refund.
    Pending orders cannot be released and return 409.
    A failed order was not purchased; this operation only dismisses it from the list.
    Returns ``released`` or ``dismissed``, plus ``number_id`` and ``e164``, or an error.
    

Inputs: number_id (required), confirm_e164 (required). Returns: object

resubmit_verificationFix and resubmit a verificationA
Destructive
Inspect

File a rejected number registration again, with fixes, from what Hail kept.

    Hail keeps a number registration's answers and files for 30 days after
    submit (``kept_until``); ``get_sms_application`` returns the kept answers
    and file names. A supplied answer map, address or document selection
    replaces that saved part. Other parts are reused. Country, number type
    and subject type stay as filed.

    Irreversible once sent: it files a new registration (a new ``id``) with
    the same credit rules as ``submit_verification``, and dismisses the
    rejected one. Returns the new registration, or an error with
    ``problems`` when nothing was sent.

Inputs: verification_id (required), attest_authorized (required), files, fields, +3 more. Returns: object

route_email_domainRoute an email address to an agentA
DestructiveIdempotent
Inspect

Choose which agent answers mail to an address, and who it answers.

    Replaces the selected email routing settings. Clearing the agent stops
    automatic replies; restoring it does not replay mail received in between.
    Setting ``email_agent_id`` together with ``clear_agent=True`` is an error.
    With ``email_agent_scope="anyone"``, a stranger can make the agent use its
    allowed tools. Mail without a passing DMARC result gets no reply.
    A custom domain must be verified with inbound and sending on.
    A field left out keeps its value, except that a new agent starts at ``"members"``.

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

Inputs: domain_id (required), clear_agent, email_agent_id, email_agent_scope. Returns: object

route_numberRoute a number to an agentA
DestructiveIdempotent
Inspect

Set the saved agents that answer a number's calls and texts.

Replaces the selected routing settings. Registering or unregistering inbound voice can change carrier and LiveKit routing; text-only changes leave it unchanged. Clearing the voice route stops AI call answers; clearing the text route stops agent replies to texts. Restoring a route does not recover missed interactions. Omitted settings retain their current values. Returns the updated number record or an error.

Inputs: number_id (required), clear_sms, clear_voice, sms_agent_id, +1 more. Returns: object

send_emailSend an emailAInspect

Send an email from a verified workspace sender.

    Plain-text emails still have sending, delivery and bounce events.

    Without ``from_``, one verified custom domain takes priority over the Hail mail address.
    Several verified custom domains require an explicit ``from_`` address.
    A custom domain blocked from sending (``sends_enabled`` false, PATCH ``/v1/email-domains/{id}``) is skipped for picks and refuses an explicit ``from_``.
    When configured, a workspace without a sender receives a Hail mail address automatically.

    Hail does not verify consent.

    Returns the email ID, status, sender, recipients and ``idempotency_key``, or an error.
    

Inputs: to (required), subject (required), recipient_consent (required), cc, +12 more. Returns: object

send_smsSend a text messageAInspect

Send an outbound text message.

    Without ``from_``, supported destinations use the workspace's alphanumeric sender ID.
    Other destinations use an eligible workspace SMS-capable number.
    A missing required number returns 422. SMS does not use the shared voice-call pool.
    US long-code texting to US recipients requires ready A2P 10DLC registration and an attached number.
    Trial texts (only to the workspace's own verified phone, set up in the console: Overview > Test a text): without from_, Hail uses one when the workspace's own number cannot text that US phone; set from_ to the trial number to use one directly. Each starts with "[Hail trial]".

    The message purpose determines the consent checks. Marketing requires a consent source.
    Hail does not independently verify the recipient's consent.

    The result includes the delivery status and retry key. A failed carrier attempt can
    appear as a message record with status ``failed``.
    

Inputs: to (required), body (required), recipient_consent (required), from_, +5 more. Returns: object

submit_verificationSubmit a verificationA
Destructive
Inspect

Submit authorized applicant details and documents for carrier registration.

    Submission is irreversible once sent for review. Carriers retain submitted documents.
    Applicant answers, address and documents follow the carrier's current
    requirements for the chosen applicant type and registration purpose.
    Number registration needs the offer's quote ID. Toll-free texting needs the
    owned number's ID. The named applicant must authorize the filing.
    The user must review and approve SMS campaign text before submission.

    For billed workspaces, an offer available for automatic purchase requires credit for
    the setup fee plus first month. Hail reserves that amount during review and
    applies it to a purchase using this registration. Hail releases the hold
    after rejection, cancellation or 30 days without purchase following approval.
    ``purpose="sms"`` registers US local numbers for US texting with carrier filing fees.
    Free toll-free verification uses type ``toll_free``, country ``US`` or ``CA``, the
    owned ``number_id`` and ``registration_kind=toll_free`` among the form fields.

    Inline files are included in the tool call and base64 adds about a third
    to their size. Decoded inline files total at most 29 MiB. The API also
    limits the combined file size, including uploads, to 30 MiB.
    The form accepts at most 100 applicant answers. ``check_verification``
    can preflight the same form without filing.

    Returns ``id``, ``state`` and ``subject_name``. Carrier review takes business days.
    A duplicate registration can return 409. A timeout can leave a submission in progress.
    Carrier field errors include ``problems`` and leave no saved submission.

Inputs: files (required), fields (required), documents (required), number_type (required), +7 more. Returns: object

update_agentUpdate an agentA
DestructiveIdempotent
Inspect

Update selected fields on a saved workspace agent.

    Replaces active settings, including instructions and the whole handover list.
    Pausing the agent or disabling a channel stops new replies on that channel.
    Omitted fields retain their values.
    Updating language or voice alone preserves the other setting.
    ``clear_fields`` resets the named settings and cannot be combined with a new
    value for the same field. Clearing the greeting lets the inbound caller speak
    first. Other resets use workspace defaults, except the handover limit resets
    to 30 minutes.
    Existing calls keep their starting settings; changes affect later calls and texts.
    Returns the updated agent or an error.

Inputs: agent_id (required), name, tools, status, +15 more. Returns: object

upload_email_attachmentUpload an email attachmentAInspect

Upload a small attachment for outbound email, as base64 text.

    Meant for small files (under about 50 KB): every base64 character goes
    through the tool call itself. Larger files go through ``create_file_upload``
    with ``purpose="email_attachment"``: its ``curl`` line sends the bytes, and its
    ``id`` works in ``send_email``'s ``attachment_ids``.
    Returns ``id``, ``filename``, ``content_type`` and ``size_bytes``.
    The ID is accepted in an email's ``attachment_ids`` and is reusable across sends.
    Unused uploads expire after 24 hours.
    The combined message and attachments must fit the 25 MB sending limit.

Inputs: filename (required), content_type (required), content_base64 (required). Returns: object

whoamiWho am IA
Read-onlyIdempotent
Inspect

Identify the account and organization authorized by the current credentials.

    Returns ``auth_kind``, ``organization_id``, ``user_id``, ``email`` and ``name``.
    Shared operator credentials have ``auth_kind="shared"`` with null user details.
    The response identifies the current actor, not a message recipient.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 46 tools

    Disambiguation3/5

    The resource groups (email, SMS, calls, numbers, agents, contacts) are mostly clear, but the verification cluster is crowded with similar tools such as check_verification, check_verification_documents, get_verification, get_sms_application, submit_verification, resubmit_verification, and amend_sms_application. Detailed descriptions help, but selection among verification lifecycle stages is still error-prone.

    Naming Consistency4/5

    Nearly all tools use a predictable snake_case verb_noun pattern, e.g. list_calls, send_sms, create_agent, cancel_verification. Minor deviations like whoami and compound names such as list_number_regions or get_verification_requirements are readable and do not undermine the overall consistency.

    Tool Count2/5

    At 46 tools, the surface is well beyond the typical 3-15 range and includes many specialized verification operations that could be consolidated. The domain is broad, but the count still makes the server heavy and increases cognitive load for agents.

    Completeness4/5

    Core workflows are well covered: calls, SMS, email, agent CRUD, number acquisition and routing, verification lifecycle, and contact lookup/creation. Minor gaps remain, such as contact update/delete, call control beyond starting/reading, and email-domain management, but agents can generally work around them.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Gives AI agents phone numbers, email, SMS, and voice calls as MCP tools, enabling them to provision numbers, capture 2FA codes, send messages, and make calls.
      15
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Let your AI agent call your phone and talk to you — MCP servers for live, interruptible voice calls + tiered alerts, using free self-hosted pieces (pjsua2 + whisper.cpp + Linphone). No paid telephony, no extra API key.
      3
      32
      Apache 2.0
    • A
      license
      A
      quality
      A
      maintenance
      Self-hosted email for AI agents: unlimited mailboxes on your own domain with docker compose, OTP/link extraction, mail_wait_for, web dashboard. v0.7.3: webhook wake example, reliable long waits (mail_wait_for), optional pending journal for task claims. Release: https://github.com/openagentemail/openagentemail/releases/tag/v0.7.3
      25
      57
      Apache 2.0