Skip to main content
Glama

create_agent_run

Create a persisted agent run for a natural-language task, with auto or manual approval and optional paused start. Returns run ID and status after tracking steps, events, and checkpoints.

Instructions

Create a persisted agent run lifecycle resource for a natural-language task. With approval_mode=auto (default) the run picks a tool from the task wording, executes synchronously, and returns completed; approval_mode=manual parks it at requires_approval until approve_agent_run, and start_paused=true parks it at paused until resume_agent_run. The run, its step log, append-only events, and a replayable checkpoint are persisted under the caller's organization and the creation is audit-logged. Use product_agent_run for the simpler synchronous helper, list_agent_runs to browse, and get_agent_run_events to follow the trail. Returns the full run resource with run_id and status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesWhat the agent should do, in plain words (min 5 characters).
toolsNoRestrict the tools the agent may pick from; defaults to search, simulate, optimize, calculate, summarize.
contextNoOptional structured context or data for the task.
max_stepsNoMaximum execution steps, 1-50; defaults to 10.
start_pausedNoPersist the run in paused state until resume_agent_run.
approval_modeNoauto executes immediately (default); manual waits for approve_agent_run before executing.auto
output_formatNoResult format: text (default), json, or markdown.text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.1.3
    • addedInput schema / properties / approval_mode / description
      Added value: +"auto executes immediately (default); manual waits for approve_agent_run before executing."
    • addedInput schema / properties / context / description
      Added value: +"Optional structured context or data for the task."
    • addedInput schema / properties / max_steps / description
      Added value: +"Maximum execution steps, 1-50; defaults to 10."
    • addedInput schema / properties / output_format / description
      Added value: +"Result format: text (default), json, or markdown."
    • addedInput schema / properties / start_paused / description
      Added value: +"Persist the run in paused state until resume_agent_run."
    • addedInput schema / properties / task / description
      Added value: +"What the agent should do, in plain words (min 5 characters)."
    • addedInput schema / properties / tools / description
      Added value: +"Restrict the tools the agent may pick from; defaults to search, simulate, optimize, calculate, summarize."
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations are minimal (readOnlyHint=false, etc.), so the description carries the burden. It discloses that the run is persisted, audit-logged, and has a step log, events, and a replayable checkpoint. It explains the lifecycle states (completed, requires_approval, paused) and how they are triggered. No contradiction with annotations; it actually reinforces that it's a write operation.

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 detailed but well-structured. It opens with the core purpose, then explains modes, then persistence and audit, then alternatives, and finally return value. No fluff; every sentence adds value. It's a bit long, but for a complex lifecycle tool, it's appropriate, so 4 rather than 5.

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

Completeness5/5

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

For a tool with 7 parameters, nested objects, and no output schema, the description covers the essential behavior: what it does, how modes affect execution, what gets persisted, and what is returned. It also references related tools. It's sufficient for an agent to call it correctly.

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?

The schema already has 100% description coverage for all parameters, so the baseline is 3. The description adds context beyond the schema by explaining the behavioral impact of approval_mode and start_paused (e.g., parks at requires_approval or paused). It also mentions the return value includes run_id and status, which is not in schema. This enriches parameter understanding, so a 4 is warranted.

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 clearly states the tool's purpose: to create a persisted agent run lifecycle resource. It distinguishes itself from siblings by mentioning approval_mode and start_paused, and explicitly names alternative tools for different use cases. The verb 'create' and resource 'agent run' are specific and unambiguous.

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?

It explicitly says when to use this tool vs alternatives: 'Use product_agent_run for the simpler synchronous helper, list_agent_runs to browse, and get_agent_run_events to follow the trail.' It also explains the behavioral differences between auto and manual approval modes and start_paused, giving clear guidance on when this tool is appropriate.

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