Skip to main content
Glama

agent_send

Destructive

Send text or tmux keys to a named agent terminal, submit input, and optionally wait for output; pending receipts indicate held messages, so do not resend.

Instructions

Type into an agent's terminal, addressed by name (or agent_id). text of any shape is prefixed with the sender tag, delivered as one bracketed paste and submitted with Enter unless submit=false. A submitted text send to a target on its current usage limit is stored and held in its message row until release; its receipt says pending, so do not resend it. keys and submit=false remain manual recovery paths. ONE EXCEPTION: text over 300 characters sent to a LEAD by anyone who is not that lead is stored and delivered as a one-line pointer instead, because a lead's pane is a human's own window; the receipt says so and names agent_message_get for the full text. Worker-bound text is never shortened at any length. With quiet_messaging on, a worker's submitted text to a Claude lead is stored with a message id and posted over the lead's messaging socket instead of typed (the same pointer when over 300 characters): the receipt says pending until the lead's prompt confirms it, hive types it into the pane once if no confirmation comes, and the socket post skips the pane checks below; do not resend a pending send. Alternatively pass keys (tmux key names like Escape, C-c, Enter). wait_ms (250-10000) returns the terminal tail after sending. A claude worker is already briefed by agent_spawn. A worker whose screen hive cannot classify is REFUSED on the text path entirely (its brief is at the spawn receipt's brief_path); keys still reaches it. A pane in tmux copy mode is REFUSED too, and retriably: tmux clears its bracketed-paste flag there, so the paste would lose its markers and the Enter would be eaten - leave copy mode (or agent_send(keys: ["-X", "cancel"]) to cancel it deliberately) and send again.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "agent_send"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysNotmux key names, e.g. ["Escape"] or ["C-c"].
nameNoThe worker's name, e.g. "impl" or "DEVX-123". Prefer passing this rather than agent_id, but pass only one: if both arrive, agent_id wins and this is ignored. A partial name works when it matches exactly one running worker, so "123" finds DEVX-123.
textNo
submitNoAppend Enter after text. Defaults to true.
wait_msNo
agent_idNoNumeric agent id. Use name instead unless you have the id to hand.
project_idNoDifferent project override. Use ONLY when the user explicitly asks for another project by name; otherwise stay in the current scope, even when results are empty.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes far beyond the destructive/non-idempotent annotations: sender-tag prefixing, bracketed-paste plus Enter submission, pending-and-held delivery under a usage limit with an explicit 'do not resend', the 300-character lead pointer exception, quiet_messaging socket posting with fallback typing, and two distinct refusal modes (unclassifiable screen, tmux copy mode with its bracketed-paste flag explanation).

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

Conciseness3/5

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

Front-loaded and information-dense, but it is a single sprawling paragraph with long parenthetical chains (the lead exception, then the quiet_messaging path, then a forward reference to 'the pane checks below'). Almost every clause carries content, yet the lack of segmentation makes the routing hard to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a non-idempotent destructive write with no output schema, it covers receipts (pending, pointer notice, brief_path), refusal semantics, and recovery paths. It does not describe the shape of a successful receipt or the project_id scoping behavior, which are the remaining gaps.

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?

At 71% schema coverage the schema handles name, keys, submit and agent_id; the description still adds real meaning — text is prefix-tagged and sent as a bracketed paste, submit=false suppresses Enter, keys are tmux names, and wait_ms returns the terminal tail. project_id is left entirely to the schema.

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: 'Type into an agent's terminal, addressed by name (or agent_id).' That immediately separates it from read-side siblings like agent_output and agent_message_get, and the addressing mechanism is stated up front.

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?

Explicitly frames keys and submit=false as 'manual recovery paths', notes 'A claude worker is already briefed by agent_spawn' (i.e. don't re-brief), and routes to agent_message_get for truncated lead text. It lacks an explicit statement of when to prefer reading via agent_output/agent_status instead of sending, so it falls short of full alternative coverage.

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