Skip to main content
Glama

Run an AI agent

run_agent

Start an AI agent run. It spends the workspace's AI credits (402 when there are none: a Pro workspace buys a pack, a Free one upgrades). A run is ASYNCHRONOUS: run_agent returns the run at once in state "queued". Call get_agent_run with its id every few seconds until the state is "proposed" (a plan or re-plan waiting for a decision), "completed" (a digest — nothing to apply) or "failed" (see error). Most runs take under a minute. A proposal changes nothing until apply_agent_run; show it to the user and let them decide first. Kinds and their input (a JSON object, passed as a string): "plan-generator" (no projectId; Administrator/ProjectManager) drafts a new project: {"goal": "what the project is", "startDate": "yyyy-MM-dd", "endDate": optional, "constraints": optional, "language": "en"|"id"|…, "maxTasks": 3–300}. "schedule-doctor" (projectId; Administrator/ProjectManager) re-plans a project that slipped: {"instruction": "what happened, e.g. the pour slipped 9 days" (optional), "language"}. "status-digest" (projectId; any team role) writes a status report: {"audience": "team"|"client"|"exec", "from": "yyyy-MM-dd", "to": "yyyy-MM-dd" (default the last 7 days), "language"}; it ends "completed" and its text is in plan.text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesAgent kind: plan-generator, schedule-doctor or status-digest
inputYesThe agent's input as a JSON object string, e.g. {"audience":"client"}. Use {} for the defaults.
projectIdNoProject id — required by schedule-doctor and status-digest, omitted for plan-generator

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that runs consume AI credits (402 when exhausted, with Pro/Free consequences), that execution is asynchronous with a 'queued' initial state, typical duration under a minute, and that a proposal changes nothing until apply_agent_run. That mutation-cost and side-effect context is not in the structured fields.

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?

Front-loads the core action and async semantics, then moves to per-kind detail; nearly every clause carries operational information. It is dense and semicolon-heavy, running the kind catalogue into one long paragraph, so it loses a little scannability, but nothing is gratuitous.

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?

There is no output schema, and the description compensates by explaining the return states and where results live (status-digest text in plan.text, error on 'failed'). For a three-parameter async mutation tool this covers everything needed to invoke and follow up correctly.

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?

Schema coverage is 100%, but the description adds meaning the schema cannot: which kind needs projectId ('plan-generator' must omit it), and the exact accepted input object per kind including field ranges (maxTasks 3–300), date formats, optional vs required fields, and the default 7-day window for status-digest.

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?

States a specific verb and resource ('Start an AI agent run') and immediately names the three agent kinds, which distinguishes it from list_agents, get_agent_run and apply_agent_run. An agent can tell what this does and what it does not do (it does not apply the result) without opening the schema.

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?

Explains the full workflow: call this, then poll get_agent_run every few seconds until proposed/completed/failed, then show the proposal to the user and use apply_agent_run to commit. It also flags the 402 credit case and states the role required per kind, which is exactly the routing information an agent needs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources