Skip to main content
Glama

Prepare a text to a lead

plan_text
Read-only

Use this when the owner asks you to text one of their leads, or to answer someone by text message (SMS). Prepare one text message (SMS) to one lead, from the account's texting number. Sends NOTHING. Runs every check the console runs (a texting number connected and approved, texting switched on, not opted out with STOP, the monthly budget) plus two more: they agreed to texts or texted the account first, and it is between 9am and 9pm their time. Returns exactly what will be sent (with the opt-out line a first text carries), from which number, to whom, why they may be texted, its length in characters and segments, the last few texts with them, and a change_token for send_text. Refused, with the reason, when a text cannot go. These go to a real person's phone: show the owner the exact text and call send_text only after they approve it.

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": {
      "lead_id": "<lead_id>",
      "text": "<text>"
    },
    "name": "plan_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe message, in the owner's words. The opt-out line is added by itself on a first text.
clientNoClient website slug (or id). Leave out on your own account; required for platform-scoped keys.
lead_idYesThe lead's id: crm_lead_id from list_inbox, an id from find_crm_leads, or a lead from Instagram's crm_lead_id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true and destructiveHint=false; the description confirms this with "Sends NOTHING" and goes well beyond it by enumerating the eligibility gates (approved texting number, texting switched on, no STOP opt-out, monthly budget, prior consent or inbound text, 9am–9pm local time) and the refusal-with-reason behavior. It also discloses that a first text carries an auto-added opt-out line and that a change_token is returned for send_text.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the trigger, then the no-send guarantee, then the checks, the return payload, refusal, and the approval rule. Despite being dense, no sentence is filler — each one carries a distinct constraint an agent needs before calling.

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?

There is no output schema, but the description compensates fully by listing the returned fields (rendered text, from-number, recipient, eligibility reason, character/segment count, recent texts, change_token). For a read-only planning tool with three simple parameters, nothing material is missing.

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?

Schema coverage is 100%, so the schema already documents lead_id sources, the client slug, and the auto-added opt-out line; the description largely restates rather than extends that. It adds only the framing that the text should be in the owner's words and sent from the account's texting number, so the baseline 3 applies.

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?

States a specific verb and resource — "Prepare one text message (SMS) to one lead, from the account's texting number" — and immediately bounds the result with "Sends NOTHING." It also names the downstream sibling send_text, so an agent can tell this apart from the tool that actually delivers the message.

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?

Opens with an explicit trigger ("Use this when the owner asks you to text one of their leads, or to answer someone by text message") and closes with the when-not/next-step rule: show the owner the exact text and call send_text only after they approve. Both the entry condition and the handoff are spelled out.

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.

Resources