Skip to main content
Glama

send_message

Send a single template directly to one person over chosen fallback channels without rules. Use for one-off codes, replies, or alerts when the template key is known.

Instructions

Send one template directly to one person over the channels you list, without rules. Use it for an explicit one-off message (a code, a reply, an alert) when you know the template key; otherwise prefer send_event. Needs the messages:write scope.

The message still passes its category's policy (preferences, frequency caps, quiet hours, unsubscribes) and, for agent keys, the agent's per-person budget, importance ceiling and approval policy. Returns the message, with the same fields as get_message. status is queued, suppressed (read status_reason) or pending_approval (held for a person: do not resend). Repeating an idempotency_key returns the original message instead of sending again. Fails with 404 for an unknown template or category, 403 when an agent may not use the category and 422 for a channel the server does not have.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoTemplate variables as a JSON object, read as `data` in the template; at most 16 KB. Defaults to {}.
categoryNoPolicy category key. `transactional` (default) has no caps, ignores quiet hours and cannot be unsubscribed from; `marketing` is capped and respects quiet hours. Agent keys may use only their allowed categories.transactional
channelsYesAt least one channel name in fallback order, e.g. `["push", "email"]`; each must be configured on the server.
templateYesKey of an existing template, e.g. `order-shipped`.
recipientYesExternal id of the person: the id your system uses for them. An unknown id gets an empty profile without addresses, so the message is suppressed with `no_reachable_channel`.
importanceNo`low` never interrupts, `normal` is the default, `high` is time-sensitive, `critical` is for security or safety only and breaks through quiet hours and caps only in categories people cannot unsubscribe from (elsewhere it is sent as `high`). An agent's ceiling lowers anything above it.normal
idempotency_keyNoUp to 200 characters derived from the triggering action; repeating it with the same API key returns the original message instead of sending again. Strongly recommended.
expires_in_minutesNoDrop the message if it is not delivered within this many minutes; set it for codes, arrivals and anything useless later. Omit for no expiry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.1.1
    • addedInput schema / properties / category / description
      Added value: +"Policy category key. `transactional` (default) has no caps, ignores quiet hours and cannot be unsubscribed from; `marketing` is capped and respects quiet hours. Agent keys may use only their allowed categories."
    • addedInput schema / properties / channels / description
      Added value: +"At least one channel name in fallback order, e.g. `[\"push\", \"email\"]`; each must be configured on the server."
    • addedInput schema / properties / data / description
      Added value: +"Template variables as a JSON object, read as `data` in the template; at most 16 KB. Defaults to {}."
    • addedInput schema / properties / expires_in_minutes / description
      Added value: +"Drop the message if it is not delivered within this many minutes; set it for codes, arrivals and anything useless later. Omit for no expiry."
    • addedInput schema / properties / idempotency_key / description
      Added value: +"Up to 200 characters derived from the triggering action; repeating it with the same API key returns the original message instead of sending again. Strongly recommended."
    • addedInput schema / properties / importance / description
      Added value: +"`low` never interrupts, `normal` is the default, `high` is time-sensitive, `critical` is for security or safety only and breaks through quiet hours and caps only in categories people cannot unsubscribe from (elsewhere it is sent as `high`). An agent's ceiling lowers anything above it."
    • addedInput schema / properties / recipient / description
      Added value: +"External id of the person: the id your system uses for them. An unknown id gets an empty profile without addresses, so the message is suppressed with `no_reachable_channel`."
    • addedInput schema / properties / template / description
      Added value: +"Key of an existing template, e.g. `order-shipped`."
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover safety flags. The description adds all the behavior an agent needs: policy still applies (preferences, caps, quiet hours, unsubscribes), agent budget/importance ceiling/approval, return shape with the same fields as get_message, the three status values with guidance to read status_reason and not resend pending_approval, idempotency behavior, and specific failure codes (404/403/422).

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?

Three dense, front-loaded paragraphs: purpose/alternative routing first, then behavior, then return values and errors. Every sentence earns its place, though a touch long.

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 mutation tool with no output schema, the description covers usage, policy interactions, return status semantics, idempotency, and error codes. An agent has everything needed to call it correctly and interpret the result.

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 the baseline is 3, but the description reinforces key semantics: channels are in fallback order, idempotency_key returns the original message on repeat. It stops short of adding syntax not already in the schema, so it lands one above baseline.

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 ('Send one template directly to one person'), defines scope ('without rules'), and explicitly names the sibling it is not (send_event). An agent can distinguish this from send_event without opening either schema.

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 when-to-use ('an explicit one-off message... when you know the template key') and names the alternative plus the condition that selects it ('otherwise prefer send_event'). Nothing is left to inference.

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