Skip to main content
Glama

run_agent

Delegate complex, multi-step tasks to an autonomous agent for independent execution, and reuse session_id to maintain context across multiple calls.

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.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.14.2
    • removedInput schema / properties / extra_args
      Removed value: -{
      -  "description": "Additional configuration parameters for agent execution (optional)",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
  2. Changed5 schema fields changedv1.0.0
    • changedInput schema / properties / agent / description
      Previous value: -"Identifier of the specialized agent to delegate the task to"New value: +"Agent name exactly as listed in list_agents resource."
    • changedInput schema / properties / cwd / description
      Previous value: -"Working directory path for agent execution context (optional)"New value: +"Working directory path for agent execution context. Must be an absolute path to a valid directory."
    • changedInput schema / properties / prompt / description
      Previous value: -"Task description or instructions for the agent to execute. When referencing file paths, use absolute paths to ensure proper file access."New value: +"User's direct request content. Agent context is separately provided via agent parameter."
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Session 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.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "agent",
      -  "prompt"
      -]New value: +[
      +  "agent",
      +  "prompt",
      +  "cwd"
      +]
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Adds useful behavior beyond the schema: the agent runs independently with dedicated context and returns a session_id in response metadata for reuse. However, with no annotations provided, the description should be clearer about potential side effects such as file modifications or long-running operations, which are implied by the examples but not stated.

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?

Two sentences, front-loaded with purpose and use cases, followed by the only critical chaining detail. Every sentence earns its place with no filler or redundant restatement of the schema.

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 an autonomous agent tool with no output schema or annotations, the description covers the core contract (task delegation, dedicated context, session continuity) but omits the result payload beyond session_id, execution lifecycle, and safety caveats. This is adequate but incomplete for a potentially powerful and side-effectful tool.

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 description coverage is 100%, so all parameter meanings are already documented and the baseline is 3. The description adds a small extra note about session_id being returned and reusable, but does not provide deeper syntax or format details beyond what the schema states.

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?

Opens with a specific verb ('Delegate') and identifies both the resource ('autonomous agent') and the execution mode ('independent execution with dedicated context'). Concrete examples like refactoring across files, fixing test failures, and batch operations remove ambiguity about what the tool is for.

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?

'Complex, multi-step, or specialized tasks' explicitly defines the intended trigger conditions, and the session_id guidance explains how to chain multiple executions. There are no exclusions or alternative tools named, but no sibling tools exist to require them.

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

Deploy Server

Other Tools