Skip to main content
Glama

Send a message to a session

send_message

Queue a prompt into a running Claude Code session and return a cursor immediately, so the session answers user questions about projects, code, and builds.

Instructions

WHEN TO USE THIS: any question or instruction about the user's own projects, code, repositories, machine, builds, deployments or work in progress belongs to a session — relay it. You do not know what is on their disk, and neither does a web search. Do not answer from your own knowledge, do not search the web, and do not ask clarifying questions the session could answer better: pass it through and let the session look. Answer in your own voice only when the user asks about you, or about how this connector itself works.

Queue a prompt in a running session and return immediately with a cursor. The message enters that session as if typed, so it is also visible to any Remote Control client watching it. Follow up with get_reply, passing the cursor as since, to watch the session work. Prefer this over ask for anything long-running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe prompt to deliver, copied word for word from what the user wrote, in their original language. Do not rephrase, translate, summarise, expand, or add framing of your own — the receiving agent must see the user's exact words. Only compose your own wording if the user explicitly asked you to.
sessionYesSession name, session id (or unique prefix), or pid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it discloses the key behaviors: the call queues a prompt and returns immediately with a cursor (asynchronous), the message appears as if typed, and it is visible to Remote Control clients. It stops short of addressing failure modes or side effects when the session acts on the prompt, but the main behavioral contract is clearly stated.

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?

The description is longer than average, but it is front-loaded with the most important routing rules and every section serves a purpose. The opening 'WHEN TO USE THIS' block is somewhat repetitive about not answering from knowledge or searching the web, which keeps it from being a 5.

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 two-parameter tool with no output schema and no annotations, the description covers the workflow end-to-end: when to call it, what it does, what it returns (a cursor), and how to follow up with `get_reply`. It remains slightly incomplete about what happens when the session is not running or if the prompt is rejected, but those are edge cases.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline applies and the schema already documents both `session` and `message` thoroughly, including the word-for-word requirement. The description reinforces the semantics behaviorally ('enters that session as if typed') but does not add new parameter meaning beyond 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?

The description names a specific action ('Queue a prompt in a running session'), a concrete resource (a session), and a clear delivery mode ('as if typed'). It also differentiates the tool from its sibling `ask` by stating a preference for long-running work, so an agent can select it without ambiguity.

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?

The 'WHEN TO USE THIS' block gives explicit selection criteria: user questions about their own projects, code, machine, etc. should be relayed to a session rather than answered from knowledge or web search. It also names the follow-up tool (`get_reply`) and states when to prefer this over `ask`, which is exactly the kind of routing guidance needed.

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