Skip to main content
Glama

send_message

Send a message to ONE contact right now, outside any flow. For reaching many contacts use a broadcast instead. Target the contact with contactId (globally unique — preferred), or with platformId (the platform-side id, e.g. the Telegram user id). platformId is NOT globally unique: it is unique only per bot, so the same Telegram user talking to two of your bots is two contacts sharing one platformId. Pass botId alongside it whenever the application has more than one bot; without botId the call succeeds only if exactly one contact in the application matches, and otherwise fails listing the candidate bots. {{var|name}} placeholders in the text resolve against that contact's variable context. Requires the manage_broadcasts permission. Media: pass up to 10 attachments as publicly reachable http(s) URLs; the text becomes the caption (max 1024 characters) and may be empty. Several attachments send as one album. The kind is inferred from the URL's file extension — override with type when the URL has none. Not supported for SDK bots. Buttons: up to 8, each carrying EXACTLY ONE destination — a url (http(s) or tg://) the recipient opens, or a flowId, an already-applied INTERACTIVE flow that runs for that recipient when they tap it. The two kinds mix freely in one keyboard, so a custom text with flow-wired buttons needs no wrapper flow. A flow button starts its flow from the start block with the recipient's own variable context, and re-runs on every tap. Broadcast and operation flows are rejected, as are flow buttons on SDK bots (taps never reach the runtime there). To send a WHOLE flow as the message instead of wiring one behind a button, use send_flow_to_contacts. Buttons cannot be combined with media; send those as two messages. Delivery is asynchronous: a successful response means the bot accepted the send, not that the platform delivered it (a broken media URL surfaces in the flow logs, not here). Unsubscribed contacts are rejected. NOT idempotent and not reversible — each call sends another message to a real person, and a sent message cannot be recalled. Confirm the recipient and text with the user before calling, and never retry a timed-out call blindly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoMessage body. Required unless media is passed; with media it becomes the caption (max 1024 characters) and may be omitted. `{{var|name}}` placeholders resolve against the recipient's variable context.
botIdNoBot to send from. Required in practice when targeting by platformId in a multi-bot application; without it the call succeeds only if exactly one contact matches, and otherwise fails listing the candidate bots.
mediaNoUp to 10 attachments. Several items send as one album with `text` as the shared caption.
buttonsNoUp to 8 buttons, rendered one per row under the message. Each needs exactly one of url or flowId; the two kinds may be mixed. Rejected together with media.
contactIdNoPreferred way to target the recipient: the globally unique FlowCastle contact id. Supply either this or platformId.
platformIdNoPlatform-side user id (e.g. the Telegram user id). NOT globally unique — unique only per bot — so pass botId alongside it when the application has more than one bot.
applicationIdNoApplication (workspace) id. Optional: an application-scoped key (app_...) defaults to its own application, but a personal key (usr_...) has no default and omitting it fails with MCP_APPLICATION_REQUIRED. Call list_applications to get the id.

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses asynchronous delivery, non-idempotence, irreversibility, the manage_broadcasts permission requirement, rejection of unsubscribed contacts, and where failures surface. It also advises confirming with the user and not blindly retrying, which is valuable behavioral context.

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?

The description is long but dense and front-loaded: the primary scoping decision comes first, then targeting, then media and button constraints, then side effects. Every sentence earns its place given the number of constraints an agent must respect.

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 7-parameter mutating tool with no output schema, the description explains what a successful response means, preconditions, unsupported cases, and failure behavior. It gives an agent enough to call the tool correctly and safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds key relational semantics: contactId is globally unique and preferred, platformId is per-bot and requires botId when ambiguous, placeholders resolve against the recipient's variable context, and each button must carry exactly one of url or flowId. These nuances go beyond the schema's field-level 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: 'Send a message to ONE contact right now, outside any flow.' It explicitly contrasts with broadcast for many contacts and with send_flow_to_contacts for whole flows, so the tool is clearly distinguishable from its siblings.

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?

It gives explicit routing guidance: use a broadcast for many contacts, use send_flow_to_contacts for a whole flow, and avoid unsupported combinations like buttons with media and flow buttons on SDK bots. This is clear when-to-use and when-not-to-use guidance.

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.

TDQS

A4.1/5.0
Disambiguation4/5

Each get_/list_ tool targets a distinct resource and the descriptions carefully separate similar pairs like get_application_context vs get_workspace_summary and get_broadcast_details vs get_broadcast_analytics. The main ambiguity is apply_actions vs validate_actions, since one runs the other's validation, but the descriptions make that relationship explicit.

Naming Consistency4/5

Names consistently follow verb_object snake_case and use familiar verbs like create, get, list, and update. Minor deviations such as read_messages instead of list_messages, apply_actions/validate_actions with plural nouns, and run_flow_autotest are still predictable and readable.

Tool Count2/5

33 tools exceeds the 25-tool threshold and makes the surface feel heavy, even though the domain is broad. Many of the read-only getters are individually useful but could be consolidated, such as merging module catalog/details or workspace/application context.

Completeness4/5

Core workflows are covered: application lifecycle, flow editing through apply_actions, deployment, contacts, broadcasts, modules, and message/event reads. Minor gaps exist, such as no dedicated delete for contacts, applications, or broadcasts, and no rollback for deployments, but agents can work around or avoid these.