Skip to main content
Glama

send_peer

Send a text message to one or more live coding agent sessions on the same machine. Fire-and-forget delivery; returns whether the peer's harness accepted the message, without waiting for a reply.

Instructions

Send a text message to one live Codex, Claude Code, and opencode session on this machine, or to several at once with peers. Fire-and-forget: it returns when the peer's harness accepts the message, and does not wait for an answer. Use the name from peers; an unambiguous prefix works. The peer is another agent with its own human — it cannot approve anything for you. Returns outcome: accepted means the peer's harness took the message — NOT that the peer has read it, acted on it, or ever will, so tell your user it was sent, not that it was received. rejected means nothing was sent and something about the call needs fixing (see refusal); sending it again unchanged will fail the same way. failed means it was attempted and the peer or transport did not take it; nothing you did is wrong and later may work. For peers, you get requested and accepted counts plus a results entry per recipient instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
peerNoOne recipient, by name from peers, e.g. "auth-refactor" or "auth-refactor.7f3". Give this or `peers`, not both.
peersNoSeveral recipients, in one call. Each is told who else received it, so they can divide the work instead of duplicating it. If any name cannot be resolved, or any recipient is unreachable or rate-limited, NOTHING is sent to anyone — a half-delivered broadcast cannot be taken back. Replies come back individually; this is not a group or a channel.
urgentNoAsk to interrupt a running turn. Unsupported on Codex, Claude Code, and opencode; the message is queued either way.
answersNoTrue if this message ANSWERS the question in in_reply_to, rather than just acknowledging it. Only an answer closes the question; "got it" leaves it open, and should.
messageYesThe text to send, verbatim.
expect_idNoThe thread_id or session_id you saw in peers. If the name now answers for a different session — the one you listed exited and another took its slug — the send is refused instead of delivered to a stranger. Pass it whenever you listed peers and then did something else first.
in_reply_toNoId of the peer message you are answering, if this is a reply.
expect_replyNoTrue if you are waiting on an answer. The peer is told an answer is expected, and message_log reports the question as unanswered until one arrives. Nothing blocks — this marks the message, it does not wait.
idempotency_keyNoYour own id for this send, so a retry cannot deliver twice. Reusing a key refuses the second call and returns the first message's id instead of sending again. Use one when you may retry — an interrupted turn, a call you are unsure landed. Remembered for 10 minutes, and forgotten if Tin Can restarts.
replay_for_minutesNoIf the peer cannot be reached, leave this message for it to collect when it comes back, for this many minutes. Nothing is replayed unless you ask: without this, a send to a session that is down is recorded and never offered again. Set it to how long the message stays worth acting on — an instruction like "rebase onto main" is worthless an hour later, so prefer a short value. Requires expect_id, which is what says WHICH session it was for; a name alone is not enough, because a restarted session answers to its predecessor's name. At most 1440.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.0
    • addedInput schema / properties / replay_for_minutes
      Added value: +{
      +  "description": "If the peer cannot be reached, leave this message for it to collect when it comes back, for this many minutes. Nothing is replayed unless you ask: without this, a send to a session that is down is recorded and never offered again. Set it to how long the message stays worth acting on — an instruction like \"rebase onto main\" is worthless an hour later, so prefer a short value. Requires expect_id, which is what says WHICH session it was for; a name alone is not enough, because a restarted session answers to its predecessor's name. At most 1440.",
      +  "maximum": 1440,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Changed7 schema fields changedv1.0.1
    • addedInput schema / properties / answers
      Added value: +{
      +  "default": false,
      +  "description": "True if this message ANSWERS the question in in_reply_to, rather than just acknowledging it. Only an answer closes the question; \"got it\" leaves it open, and should.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / expect_id
      Added value: +{
      +  "description": "The thread_id or session_id you saw in peers. If the name now answers for a different session — the one you listed exited and another took its slug — the send is refused instead of delivered to a stranger. Pass it whenever you listed peers and then did something else first.",
      +  "type": "string"
      +}
    • changedInput schema / properties / expect_reply / description
      Previous value: -"True if you are waiting on an answer. Recorded; nothing blocks."New value: +"True if you are waiting on an answer. The peer is told an answer is expected, and message_log reports the question as unanswered until one arrives. Nothing blocks — this marks the message, it does not wait."
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "Your own id for this send, so a retry cannot deliver twice. Reusing a key refuses the second call and returns the first message's id instead of sending again. Use one when you may retry — an interrupted turn, a call you are unsure landed. Remembered for 10 minutes, and forgotten if Tin Can restarts.",
      +  "type": "string"
      +}
    • changedInput schema / properties / peer / description
      Previous value: -"Peer name from peers, e.g. \"auth-refactor\" or \"auth-refactor.7f3\"."New value: +"One recipient, by name from peers, e.g. \"auth-refactor\" or \"auth-refactor.7f3\". Give this or `peers`, not both."
    • addedInput schema / properties / peers
      Added value: +{
      +  "description": "Several recipients, in one call. Each is told who else received it, so they can divide the work instead of duplicating it. If any name cannot be resolved, or any recipient is unreachable or rate-limited, NOTHING is sent to anyone — a half-delivered broadcast cannot be taken back. Replies come back individually; this is not a group or a channel.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 8,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "peer",
      -  "message"
      -]New value: +[
      +  "message"
      +]
  3. Changed1 schema field changedv0.9.0
    • changedInput schema / properties / urgent / description
      Previous value: -"Ask to interrupt a running turn. Currently unsupported on both runtimes; the message is queued either way."New value: +"Ask to interrupt a running turn. Unsupported on Codex, Claude Code, and opencode; the message is queued either way."
  4. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden, and it excels: it defines fire-and-forget semantics, the exact meaning of accepted/rejected/failed, the atomic all-or-nothing behavior of peers, urgent being unsupported on the named harnesses, and replay only occurring when replay_for_minutes is set. No hidden side effects are left for the agent to discover.

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?

Although the description is long, it is front-loaded with the core action and every subsequent sentence addresses a distinct semantic concern made necessary by 10 parameters and no output schema. The outcome definitions are organized by severity, and the peers-specific behavior is called out separately instead of being mixed into the single-recipient flow.

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?

Since there is no output schema, the description fully compensates by specifying return outcomes for single sends and batch sends, and it covers edge behaviors such as ambiguous prefixes, unreachable peers, idempotency, and session identity. An agent has enough detail to invoke this tool correctly and to set user expectations about delivery semantics.

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?

The input schema already documents all 10 parameters, so the baseline is 3, but the description adds substantial meaning beyond the schema: it explains what accepted/rejected/failed mean, why expect_id prevents cross-session misdelivery, when idempotency_key should be used, and how replay_for_minutes should be chosen based on message shelf-life.

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 first sentence names a specific verb ('send'), resource ('live Codex, Claude Code, and opencode session'), and recipient shape ('or to several at once with peers'). It is clearly differentiated from the sibling tools: peers is about naming/listing, and message_log is about message records, whereas send_peer is the action tool.

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?

The description tells the agent to use names from peers, explains when to supply peers vs peer, and warns against expecting approval from the receiving agent. It references message_log for tracked questions but stops short of explicitly stating 'to read messages or check answers, use message_log' as a when-not-to-use exclusion.

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

Deploy Server

Other Tools