Skip to main content
Glama

run_agent

Delegate complex multi-step tasks to an autonomous agent for independent execution with dedicated context. Reuse the returned session_id to maintain conversation continuity across multiple executions.

Instructions

Delegate complex, multi-step, or specialized tasks to an autonomous agent for independent execution with dedicated context (e.g., refactoring across multiple files, fixing all test failures, systematic codebase analysis, batch operations). Returns session_id in response metadata - reuse it in subsequent calls to maintain conversation context continuity across multiple agent executions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYesWorking directory path for agent execution context. Must be an absolute path to a valid directory.
agentYesAgent name exactly as listed in list_agents resource.
promptYesUser's direct request content. Agent context is separately provided via agent parameter.
extra_argsNoAdditional configuration parameters for agent execution (optional)
session_idNoSession ID for continuing previous conversation context (optional). If omitted, a new session will be auto-generated and returned in response metadata. Reuse the returned session_id in subsequent calls to maintain context continuity.
Behavior3/5

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

No annotations provided, so the description must disclose behavioral traits. It mentions autonomous execution and context continuity via session_id, but lacks details on safety (e.g., what gets modified), error handling, or rate limits. The absence of annotations puts more burden on the description, which is only partially fulfilled.

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 two sentences: the first provides purpose and examples, the second explains a key behavior (session_id reuse). It is front-loaded with important information and wastes no 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 no output schema, the description covers the response metadata (session_id). It explains the core behavior and parameter usage. However, it could be more complete by mentioning error scenarios, timeouts, or concurrency implications, which are common for agent delegation tools.

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 100%, but the description adds value beyond the schema: it explains the `session_id` parameter's role in maintaining context continuity and how it is returned. It also clarifies the distinction between `prompt` (user request) and `agent` context. This extra context helps agents use parameters correctly.

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 uses a specific verb ('Delegate') and resource ('multi-step, or specialized tasks to an autonomous agent'), and provides concrete examples (refactoring, fixing test failures, codebase analysis). It clearly distinguishes the tool's purpose as handling autonomous, multi-step tasks, even though no sibling tools are listed.

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 explicitly states when to use the tool (complex, multi-step, specialized tasks) and provides examples. It does not include explicit when-not-to-use statements or alternatives, but the context is clear enough without siblings.

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/shinpr/sub-agents-mcp'

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