Skip to main content
Glama

Send message to peer

send_peer

Sends a text message to one or several live Codex, Claude Code, or opencode sessions on this machine, so you can hand off work or ask a peer agent directly 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 host 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 host 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 strict pull receivers, accepted means stored in the inbox, with inbox_state queued or quarantined; no wake-up occurs. For peers, you get requested and accepted counts plus a results entry per recipient instead.

Input 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?

Far beyond what annotations convey: it defines the `outcome` enum (accepted/rejected/failed), warns that accepted is not read/acted-on, specifies broadcast atomicity ('NOTHING is sent to anyone'), notes strict pull receivers get inbox_state queued/quarantined with no wake-up, and discloses the 10-minute idempotency window with loss on restart. The readOnlyHint=false / destructiveHint=false profile is consistent with a non-destructive write.

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?

Front-loaded with purpose and the fire-and-forget contract, then the outcome semantics that an agent genuinely needs. Dense and mostly waste-free, though the outcome paragraph runs long enough that it could be tightened without losing meaning.

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?

No output schema exists, and the description fully compensates by documenting return fields (outcome, refusal, requested/accepted counts, results) and the partial-batch failure story. All ten parameters have meaningful semantics and the failure modes are enumerated.

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 already 100%, so the baseline is 3; the description still adds value by stating peer/peers exclusivity, the prefix-matching rule, and the operational intent behind idempotency and replay. It stops short of restating every param, which is appropriate given the dense 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?

Opens with a specific verb and resource ('Send a text message to one live Codex, Claude Code, and opencode session'), scopes it to this machine, and names the sibling (`peers`) that handles the multi-recipient variant. An agent can distinguish this from receive_peer_messages, peers, and message_log without opening any 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?

Routes the agent to `peers` for names and notes that an unambiguous prefix works. It states what the tool does not do ('does not wait for an answer'), and gives per-parameter when-to-use guidance: `idempotency_key` 'when you may retry', `replay_for_minutes' for down peers with a warning that stale instructions are worthless, and `urgent` being effectively a no-op on these platforms.

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