Skip to main content
Glama

Ask a session and wait for its reply

ask

Relay a user's question about their own code or projects to a live Claude Code session and wait for the answer in one call. Best for short queries that need context from the machine or repository.

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.

Send a prompt and wait for the answer in one call. Best for short questions. If the session is still working when the wait runs out, this returns the output so far plus a cursor — continue with get_reply rather than calling ask again, which would send the prompt a second time.

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.
timeout_secondsNoHow long to wait for the answer before returning partial output and a cursor (default and max 45s; values below 40 are raised to it). Do not shorten this: an answer that arrives inside this call needs no polling at all, and polling is where answers get lost. The 60s client deadline is the only reason it is not longer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full disclosure burden. It discloses that the call waits for a reply, may time out and return partial output plus a cursor, and that re-calling ask would duplicate the prompt. This is substantive behavioral context beyond the title.

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?

Despite its length, the description is front-loaded with a clearly marked WHEN TO USE section and every sentence carries routing or behavior guidance. No filler; the formatting makes the high-priority instruction immediately visible.

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?

With no output schema and no annotations, the description still explains the core call/response contract, timeout behavior, cursor continuation, and when to answer directly from the agent. It is complete enough for an agent to invoke ask correctly and avoid the common duplicate-prompt mistake.

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?

The schema already documents all three parameters with detailed descriptions (100% coverage), so the baseline is 3. The description mostly reuses the 'prompt' concept and does not add syntax, format, or cross-parameter relationships beyond what the schema provides.

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?

States the verb and resource explicitly: 'Send a prompt and wait for the answer in one call.' It also differentiates itself from the continuation tool by warning not to call ask again after a timeout ('continue with get_reply'), so an agent can tell it apart from siblings.

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 description opens with a 'WHEN TO USE THIS' block that assigns ownership of user-project questions to sessions and explicitly forbids answering from memory or web search. It gives the continuation rule ('continue with get_reply rather than calling ask again') and marks the tool as best for short questions, giving clear when-to and when-not-to guidance.

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