Skip to main content
Glama

ask_agent

Send a question to another local agent (Claude Code or Codex) and receive its answer, with optional thread context and sandboxed execution.

Instructions

Ask another local agent a question and get its answer (headless, blocking). Pass session_id to ask within an existing thread's context — the answer comes from a snapshot of that thread (for Claude Code, a hidden parallel branch in the same session); a live interactive view of it will not see the exchange. Codex runs sandboxed read-only unless allow_writes. Cursor is not askable (no CLI). Relay depth is capped at 2 to prevent agent-to-agent loops.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the callee
fromNoWho is asking, e.g. 'claude session abc123'
agentYes
modelNoclaude only: model override, e.g. 'haiku'
promptYes
timeout_sNoDefault 240
session_idNoExisting thread to resume for context
allow_writesNocodex only: workspace-write sandbox
Behavior5/5

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

No annotations are provided, so the description carries full burden. It transparently discloses headless/blocking behavior, session_id side effects (hidden parallel branch), codex sandbox restrictions, and relay depth limit. This is comprehensive for a complex tool.

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 a single paragraph of five sentences, all front-loaded with the core action. Every sentence adds critical context (headless, blocking, session mechanics, sandbox, relay limit, unaskable agents). No wasted words.

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?

Given 8 parameters, 2 required, and multiple behavioral nuances, the description covers the key points: headless/blocking, session context, sandboxing, relay limit, and which agents are askable. It does not explicitly describe return value format or error handling, but the tool is blocking and returns an answer directly. Minor gap but overall solid.

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 75%, high enough that description need not cover every param. The description adds value beyond schema by explaining session_id's effect (thread snapshot, hidden exchange) and allow_writes (sandbox override for codex). This enriches parameter understanding.

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 tool's purpose: 'Ask another local agent a question and get its answer (headless, blocking).' It specifies the verb (ask) and resource (another local agent). The sibling tools all relate to session management, so this tool's purpose is distinct.

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 provides clear context for usage: passing session_id for thread context, relay depth cap, and cursor being unaskable. It doesn't explicitly state when to use versus alternatives, but the sibling tools are sufficiently different that no comparison is needed.

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/rishabhjava/agent-bus'

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