Skip to main content
Glama

run

Execute a single Claude agent in a Docker container to complete a task prompt. Configure resources, tools, model, and execution limits for isolated and customizable agent execution.

Instructions

Run a single Claude agent in a Docker container. Returns the agent's text output and metadata.

Args: prompt: The task prompt for the agent. sandbox: Named sandbox spec (from ~/.claude/sandboxes/) or inline JSON. Overrides below are merged on top. network: Whether the container has network access (default: true — needed for API calls). tools: Comma-separated list of allowed Claude tools (default: Read,Write,Glob,Grep,Bash). mounts: JSON array of mount specs: [{"host_path": "...", "container_path": "...", "readonly": true}]. model: Claude model to use (default: sonnet). Options: haiku, sonnet, opus. timeout: Max execution time in seconds (default: 120). system_prompt: System prompt injected via --system-prompt (role, persona, instructions). claude_md: Project instructions written to workspace CLAUDE.md. output_schema: JSON schema string for structured output (--json-schema). mcps: JSON array of MCP server names to attach: ["database-mcp", "whatsapp"]. effort: Effort level: low, medium, high, max. max_budget: Explicit USD budget cap. env_vars: JSON object of environment variables: {"KEY": "value"}. input_files: JSON object of files to inject: {"/path": "content"}. memory: Docker memory limit (e.g. "2g"). cpus: Docker CPU limit (e.g. 2.0). gpu: Pass --gpus all to Docker for GPU access (default: false). Acquires the "gpu" resource pool (capacity 1). resources: JSON array of named resource pools to acquire before execution (e.g. '["gpu", "database"]'). Agents wait for all resources. Configure capacity via SWARM_RESOURCE_= env vars. input_type: Natural language type describing what the agent receives (e.g. "research notes", "[code-review]"). output_type: Natural language type describing what the agent must produce (e.g. "[mcp-server] with [test-suite]").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
sandboxNo
networkNo
toolsNoRead,Write,Glob,Grep,Bash
mountsNo[]
modelNosonnet
timeoutNo
system_promptNo
claude_mdNo
output_schemaNo
mcpsNo
effortNo
max_budgetNo
env_varsNo
input_filesNo
memoryNo
cpusNo
gpuNo
resourcesNo
input_typeNo
output_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must convey behavioral traits. It details resource acquisition, GPU access, and Docker limits, but does not explicitly state whether the operation is destructive or cleans up containers. It mentions returning 'text output and metadata' but not error handling or side effects like filesystem modifications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is verbose, spanning multiple paragraphs with per-parameter bullet points. While organized, it could be more concise by front-loading key behavioral traits and reducing parameter explanations that could be derived from defaults. It earns space but loses efficiency.

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 the tool's complexity (21 parameters, Docker orchestration), the description covers purpose, parameters, and resource management comprehensively. It lacks details on return format beyond 'text output and metadata' and does not address error or cancellation handling, but remains largely complete.

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?

With 0% schema coverage, the description fully compensates by explaining each of the 21 parameters with default values, types, and examples (e.g., mcps: 'JSON array of MCP server names to attach: ["database-mcp", "whatsapp"]'). This adds significant meaning beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Run a single Claude agent in a Docker container.' indicating a specific verb and resource. The word 'single' hints at distinction from sibling tools like 'chain' or 'pipeline' that handle multi-step workflows, though it does not explicitly contrast them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not specify scenarios where 'run' is preferable (e.g., one-off tasks) or when to avoid it (e.g., multi-step orchestration). Sibling tools like 'chain', 'pipeline', or 'map' are not mentioned.

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/stiege/swarm-mcp'

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