Skip to main content
Glama

send_and_wait

Send a message to a Claude Code session and retrieve its full response by polling until completion.

Instructions

Send a message to a Claude Code session and wait for the full response.

Polls until the session produces a result event (turn complete), then returns the assistant's response. Use this when you need the other session's answer.

Args: session_id: The session ID to send to. message: The message text to send. timeout: Max seconds to wait for a response (default 120). poll_interval: Seconds between polls (default 1.5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
messageYes
timeoutNo
poll_intervalNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description explains the polling mechanism, waiting for turn complete, and the timeout/poll_interval parameters. It discloses synchronous behavior but doesn't detail timeout handling or potential errors.

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?

The description is concise, front-loaded with the main purpose, and the Args block is clearly structured. Every sentence adds value without redundancy.

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?

The description adequately explains the tool's behavior and parameters for a synchronous send-and-wait operation. The presence of an output schema reduces the need to describe return values. Minor omission: no mention of error handling on timeout.

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?

Schema coverage is 0%, but the description includes an 'Args' section that explains each parameter's purpose (session_id, message, timeout, poll_interval), fully compensating for the lack of 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?

The description clearly states the action (send and wait) and the resource (Claude Code session). It distinguishes itself from siblings like 'send_message' by emphasizing the waiting behavior.

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 says 'Use this when you need the other session's answer,' providing explicit usage context. It doesn't explicitly mention when not to use, but the contrast with 'send_message' is implied.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/es617/cc-tap'

If you have feedback or need assistance with the MCP directory API, please join our Discord server