Skip to main content
Glama
abryfs
by abryfs

Preflight a message before sending

preflight_message
Read-onlyIdempotent

Validate outbound SMS/iMessage drafts before sending to catch carrier-filtering risks, segment blowups, and dropped iMessage effects. Returns a verdict with actionable fixes.

Instructions

Analyzes (lints) a draft SMS/iMessage BEFORE you send it — it sends nothing itself, makes no delivery attempt, and has no side effects. Call this first, before send_message or any other messaging tool, on every outbound draft. Returns: a verdict (pass, warn, block, or needs_context — block-severity issues that depend on context you didn't provide, like whether this is the first message to this contact); a list of findings, each with a severity, a stable rule id, a plain-language explanation, an optional concrete fix, and a citation URL (AgentPhone docs, CTIA, or Twilio guidelines) backing the rule; and a send trace with the destination classification, the assumed delivery channel (imessage/sms/mms/unknown), SMS segment math (encoding, segment count), and — given a 10DLC campaign_type — a daily-quota illustration. Use it to catch carrier-filtering risks (missing opt-out language, missing brand identification, missing opt-in wording on first messages), invalid iMessage send_style values, oversized media carousels, and GSM-7/UCS-2 segment blowups from stray unicode before spending a real send. Every finding's fix field is directly actionable: apply it to the draft verbatim (e.g. append the exact quoted sentence), then call preflight_message again — loop until the verdict is pass. Never treat needs_context as permission to send; supply the missing context and re-check.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesThe exact message text to preflight. Pass an empty string for a media-only send. This text is used only for local analysis — the tool never stores or forwards it anywhere.
to_numberNoSingle destination: E.164 phone number (e.g. +15551234567), email (iMessage only), a 5-6 digit short code, or a grp_ group id. Omit when using `recipients` for a multi-recipient group.
brand_nameNoSender brand or company name that should be identifiable in a first message. Without it the brand-identification check degrades to advisory only.
media_urlsNoMedia attachment URLs. 2-20 entries triggers an iMessage carousel; check the returned findings for carousel-size warnings on other channels.
recipientsNo2+ destinations to create a new iMessage group (iMessage only, never delivers as SMS). Do not combine with to_number.
send_styleNoiMessage-only visual send effect (e.g. "confetti", "slam"). Silently dropped outside iMessage — flagged unless the channel is confirmed iMessage.
campaign_typeNo10DLC campaign tier, if known, to attach a static daily-send-cap illustration to the trace.
response_formatNoOutput size. "detailed" (default): full messages, fixes, and citation URLs. "concise": one line per finding (severity, rule, fix), ~10x fewer tokens — same engine, same verdict, everything needed to act; use it for high-volume loops.
reply_to_message_idNoiMessage-only threaded reply target message id.
destination_line_typeNoDestination phone line type, if known from an external lookup. Never guess this from the number itself — VoIP lines often have unreliable iMessage/SMS delivery.
destination_capabilitiesNoKnown delivery capabilities for the destination, if you already looked them up. Passing this explicitly always takes precedence over — and skips — this server's own optional lookup.
is_first_message_to_contactNoWhether this is the first outbound message ever sent to this contact. Set true or false when you know it — first messages carry stricter compliance rules (opt-out language, brand identification, opt-in wording). Leave unset only if genuinely unknown; the tool then reports affected findings as conditional instead of asserting them (verdict needs_context).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
traceYes
verdictYes
findingsYes
Behavior5/5

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

Annotations (readOnlyHint=true, idempotentHint=true) are reinforced and expanded by the description: 'sends nothing itself, makes no delivery attempt, and has no side effects.' It also details the verdict types, the loop behavior, and that body text is used only for local analysis. There is no contradiction between the description and annotations.

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 description is long but front-loaded with the essential safety and usage statement. It covers return values, rules, and a verification loop. Some redundancy exists (e.g., 'sends nothing itself' and 'no side effects' are repeated), but the complexity of the tool justifies the length.

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?

The description fully covers what the tool does, what it returns (verdicts, findings, trace), how to use it iteratively, and compliance use cases. An output schema is present, so return-value details are already structured. The description also handles edge cases like needs_context and media carousels.

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 100%, so each parameter is individually described. The tool description adds cross-parameter context: how media_urls triggers carousel warnings, how campaign_type affects the quota illustration, and how is_first_message_to_contact influences verdicts. This goes beyond the schema descriptions.

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 description opens with a specific verb and resource: 'Analyzes (lints) a draft SMS/iMessage BEFORE you send it.' It clearly distinguishes itself from send_message by stating it sends nothing and makes no delivery attempt. The purpose is unmistakable and well-aligned with the title.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is given: 'Call this first, before send_message or any other messaging tool, on every outbound draft.' It also tells the user what not to do: 'Never treat needs_context as permission to send; supply the missing context and re-check.' This covers both when to use and when not to proceed.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abryfs/willitsend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server