Skip to main content
Glama

Send a text message

send_sms

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``.
    

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": {
      "to": "<to>",
      "body": "<body>",
      "recipient_consent": "<recipient_consent>"
    },
    "name": "send_sms"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesRecipient phone number in E.164 format, such as ``+14155551234``.
bodyYesMessage text. Long bodies are split into carrier segments.
from_NoSender: an active E.164 workspace number with SMS, from ``list_numbers``. Omitted: picked by destination (see the tool description).
metadataNoExtra data stored on the message record.
llm_modelNoThe calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics.
message_typeNoPurpose of the communication for consent checks. Transactional or service messages are ``informational``; promotional messages are ``marketing``.informational
consent_sourceNoWhere or how consent was obtained, such as ``signup form``. Required when ``message_type`` is ``marketing``.
idempotency_keyNoRetry key. The ``idempotency_key`` from an earlier response refers to that original request instead of starting a new one. Omitted: a new key is generated and returned.
recipient_consentYesConfirmation from the user that the recipient lawfully agreed to be contacted. Hail requires ``true`` and does not independently verify consent.
consent_obtained_atNoWhen consent was obtained, as an ISO 8601 timestamp, if known.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / llm_model / description
      Previous value: -"Model ID of the calling agent. Optional. Recorded for analytics only."New value: +"The calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics."
    • changedInput schema / properties / metadata / description
      Previous value: -"Free-form JSON object stored on the message record."New value: +"Extra data stored on the message record."
    • changedInput schema / properties / recipient_consent / description
      Previous value: -"Attestation that the recipient lawfully agreed to be contacted, as the user confirmed it. Hail does not check it; only ``true`` is accepted."New value: +"Confirmation from the user that the recipient lawfully agreed to be contacted. Hail requires ``true`` and does not independently verify consent."
  2. Changed4 schema fields changed
    • changedInput schema / properties / message_type / description
      Previous value: -"``informational`` for transactional or service messages, or ``marketing``."New value: +"Purpose of the communication for consent checks. Transactional or service messages are ``informational``; promotional messages are ``marketing``."
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "agent_id": {
      +        "anyOf": [
      +          {
      +            "format": "uuid",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The agent this text belongs to: the number's text agent on inbound texts, the agent that wrote it on outbound texts. Null when no agent is involved.",
      +        "title": "Agent Id"
      +      },
      +      "body": {
      +        "description": "Message text.",
      +        "title": "Body",
      +        "type": "string"
      +      },
      +      "direction": {
      +        "description": "'outbound' for messages Hail sent, 'inbound' for messages received.",
      +        "enum": [
      +          "outbound",
      +          "inbound"
      +        ],
      +        "title": "Direction",
      +        "type": "string"
      +      },
      +      "error_code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Carrier error code if delivery failed. Null on success or while pending.",
      +        "title": "Error Code"
      +      },
      +      "from_e164": {
      +        "description": "Sender phone number, E.164 format.",
      +        "title": "From E164",
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "Unique identifier for this message.",
      +        "format": "uuid",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "idempotency_key": {
      +        "description": "Key that identifies this exact request when retrying.",
      +        "type": "string"
      +      },
      +      "organization_id": {
      +        "description": "Organization that sent or received this message.",
      +        "format": "uuid",
      +        "title": "Organization Id",
      +        "type": "string"
      +      },
      +      "provider_message_sid": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The carrier/provider's identifier for this message, if assigned.",
      +        "title": "Provider Message Sid"
      +      },
      +      "requested_at": {
      +        "description": "When the send was requested, ISO 8601 timestamp.",
      +        "format": "date-time",
      +        "title": "Requested At",
      +        "type": "string"
      +      },
      +      "segment_count": {
      +        "description": "Number of carrier SMS segments the body was split into.",
      +        "title": "Segment Count",
      +        "type": "integer"
      +      },
      +      "sent_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "When the message was handed to the carrier, ISO 8601 timestamp. Null until sent.",
      +        "title": "Sent At"
      +      },
      +      "status": {
      +        "description": "Delivery status: 'queued', 'sent', 'delivered', 'failed', 'undelivered', or 'received' (inbound messages).",
      +        "enum": [
      +          "queued",
      +          "sent",
      +          "delivered",
      +          "failed",
      +          "undelivered",
      +          "received"
      +        ],
      +        "title": "Status",
      +        "type": "string"
      +      },
      +      "to_e164": {
      +        "description": "Recipient phone number, E.164 format.",
      +        "title": "To E164",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "organization_id",
      +      "from_e164",
      +      "to_e164",
      +      "direction",
      +      "agent_id",
      +      "status",
      +      "body",
      +      "provider_message_sid",
      +      "segment_count",
      +      "error_code",
      +      "requested_at",
      +      "sent_at",
      +      "idempotency_key"
      +    ],
      +    "title": "SmsResponse",
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / title
      Removed value: -"send_sms_toolDictOutput"
  3. Changed1 schema field changed
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Model ID of the calling agent. Optional. Recorded for analytics only.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Well beyond the annotations, it discloses that SMS does not draw from the shared voice-call pool, that marketing messages require a consent source, that Hail does not verify recipient consent, that trial sends are prefixed '[Hail trial]', and that a failed carrier attempt still surfaces as a message record with status failed. It also explains the retry-key behavior. Nothing here contradicts the supplied hints, including idempotentHint=false, since the key is opt-in.

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 critical routing and consent facts are front-loaded, but the body is a dense block of indented sentences covering five distinct concerns without headers or bullets. Some content is duplicated from the schema, notably that Hail does not independently verify recipient consent, which appears in both the prose and the recipient_consent parameter description.

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 10-parameter, open-world mutation with real compliance consequences, the description covers error modes, registration prerequisites, consent obligations, trial routing, and failure reporting. With an output schema present, it correctly omits return-value documentation and spends its length on behavior the agent cannot infer elsewhere.

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 100%, so the schema baseline already carries most parameter meaning. The description still adds real value on from_ (destination-based sender selection, trial-number override) and on the consent relationship between message_type and consent_source, which the schema only states mechanically. It does not clarify metadata, llm_model, or consent_obtained_at, so it exceeds baseline without fully covering the 10 parameters.

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?

Opens with a specific verb and resource: 'Send an outbound text message.' The channel-specific scope (SMS only, as opposed to the sibling send_email) is evident from the tool name and body, but the description never explicitly routes the agent away from email or toward list_numbers for sender selection, so it stops short of full sibling differentiation.

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?

Gives concrete conditional guidance: pass from_ to pin a sender, omit it to let the destination decide, and use the trial number directly when the workspace's own number cannot text the US recipient. It also states when a 422 occurs and that US long-code texting needs A2P 10DLC registration. It lacks an explicit 'use send_email instead when...' contrast, which keeps it at 4.

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.