Skip to main content
Glama
songzhifei512

multi-agent-bridge

run_claude

Run Claude headlessly for reasoning/architecture tasks, with session resume and automatic retry on rate limits or timeouts.

Instructions

Async call Claude CLI (claude -p headless) to run a task. For reasoning/architecture. Injects auth env. Non-blocking. Auto-tracks task. Pass session_id to resume a prior Claude session (preserves context); the new session id is captured from output and returned for later resumption. Retries automatically on 429/rate-limit/timeout with exponential backoff (default 2 retries, 3 total attempts); set max_retries=0 to disable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
promptYes
task_idNo
workdirNo
plan_modeNo Plan 模式:只读调研,强制关 auto,产出方案不落盘
session_idNo
max_retriesNo
timeout_secNo
fork_on_failNo A 失败自动 fork:真失败时父 superseded + 生成备选子任务给此 agent 承接(仅工作流任务,≤3 上限)。不传不自动 fork。
retry_max_msNo
capture_traceNo 捕获完整推理 step 流存 task.trace,默认 false
retry_base_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full disclosure burden and handles it well: non-blocking execution, auth env injection, automatic task tracking, session resume semantics, and a precise retry policy (triggers on 429/rate-limit/timeout, default 2 retries/3 attempts, max_retries=0 to disable). This is substantial behavioral context far beyond a minimal 'calls Claude CLI' statement.

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?

Front-loaded with verb+resource+purpose in the first sentence, then dense telegraphic fragments ('Injects auth env. Non-blocking. Auto-tracks task.'). Slightly long, but every sentence carries distinct, non-redundant information with no filler.

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

Completeness3/5

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

For a 12-parameter async tool with no output schema and no annotations, the description covers the core execution flow, retry behavior, and session contract. It omits the overall return contract (only the session id is mentioned as returned), how callers retrieve results, and the semantics of workdir/timeout_sec/model. The high complexity sets a high bar that is partially met.

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 coverage is only 25%, so the description must compensate. It meaningfully explains session_id (resume semantics, new id captured and returned) and max_retries (disable flag, default attempt count), and implies backoff timing for the retry_ms params. But roughly 8 parameters (model, task_id, workdir, timeout_sec, etc.) remain semantically opaque in both schema and description.

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 a specific verb ('Async call') plus a concrete resource ('Claude CLI (claude -p headless)') with a clear task purpose ('run a task') and domain ('For reasoning/architecture'). The named CLI and the async/non-blocking qualifier let an agent distinguish it from sibling run tools (run_codex, run_qwen) without opening their schemas.

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?

Gives clear context that this tool is for reasoning/architecture work, which orients an agent toward the intended scenario. However, it never names sibling alternatives (run_codex, run_qwen) or states when-not-to-use, so the routing guidance is contextual rather than explicitly exclusionary.

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