Skip to main content
Glama

Run Claude Code

claude_run

Launch a Claude Code subagent in a workspace to run tasks in the background, returning a job ID for polling status. Use consult for read-only analysis or execute for file-editing tasks.

Instructions

Start a new Claude Code session in a workspace. Returns a jobId immediately; the run continues in the background. Use claude_status to poll for the result. Tier "consult" is read-only; "execute" may edit files in the workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tierYesPermission tier for the run.
modelNoModel alias or full name; defaults to the CLI's.
effortNoReasoning effort.
promptYesThe task for the subagent.
maxTurnsNo
workspaceYesAbsolute path to an allowed workspace directory.
waitSecondsNoBlock up to this long for the first result instead of returning at once.
maxBudgetUsdNoSpend ceiling for the run.

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?

Annotations already convey readOnlyHint=false, openWorldHint=true, and idempotentHint=false. The description adds valuable context beyond that: the asynchronous job/background behavior, the immediate jobId return, and the file-editing risk of the execute tier. It could further mention cancellation semantics, but it is not misleading and genuinely informs behavior.

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 three sentences with no wasted words. It front-loads the core operational fact (returns jobId, runs in background), states the polling dependency, and gives tier-based safety guidance. A slight improvement would be naming claude_cancel, but the current length is appropriate.

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 tool with 8 parameters and no output schema, the description covers the most decision-critical context: async behavior, how to retrieve results, and the read-only vs mutation distinction. It does not describe cancellation via claude_cancel or error/timeout behavior, but the core invocation workflow is clearly captured.

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?

With 88% schema coverage, the schema already documents most parameters. The description adds meaning for the tier parameter by explicitly mapping 'consult' to read-only and 'execute' to potential file edits. It does not add details for model, effort, maxTurns, waitSeconds, or maxBudgetUsd, but the schema already handles those adequately.

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 identifies the tool with a specific verb ('Start a new Claude Code session'), names the workspace resource, and distinguishes it from siblings by explaining the jobId return value and background execution. It also explains the two tiers, which clarifies what the tool actually does.

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 explicitly directs the agent to use claude_status to poll for results, and it states when each tier is appropriate: 'consult' is read-only while 'execute' may edit files. This provides clear decision-making context relative to sibling tools.

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