Skip to main content
Glama

Run an agent's routine

run_routine

Starts an agent routine immediately, optionally passing event payload data and waking a specific or every matching open wait.

Instructions

Start one of an agent's routines now (like Test run, also when paused), optionally with an event payload the agent reads as data. With waitId, wakes only that open wait (openbot.await_event); without it, wakes every matching open wait. No retry key: calling twice runs twice.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "agent": "<agent>",
      "routine": "<routine>"
    },
    "name": "run_routine"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNoWait for the run's delivery to end (when it has one).
agentYesAgent ID or agent name (case-insensitive), as list_agents shows it.
waitIdNoWake only this open wait of the agent.
payloadNoEvent text (max 4,000 characters).
routineYesRoutine ID or name, as list_agents shows it.
timeoutSecondsNoHow long to wait. Timing out stops only the wait; the agent keeps working.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and idempotentHint=false; the description reinforces the latter concretely ('No retry key: calling twice runs twice') and discloses that a paused agent still runs — genuine added context. However, it says nothing about permissions, what happens to in-flight runs, or what a caller gets back from a start, which is the larger burden for a non-read-only tool.

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?

Three tight sentences, front-loaded with the core action before the conditional wait behavior and the idempotency warning. Slightly dense — the parenthetical 'like Test run' and the 'openbot.await_event' reference assume internal vocabulary — but no sentence is filler.

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?

With 6 parameters, full schema coverage, no output schema, and annotations carrying the safety profile, this description covers the behavior an agent needs: what starts, the wait fan-out semantics, and the duplicate-call hazard. The remaining gap is the absence of any return-value or delivery-follow-up hint, though absent an output schema that is a minor omission.

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%, so the baseline is 3; the description earns the upgrade by explaining the branching semantics of waitId — that omitting it fans out to every matching open wait, and supplying it narrows to one. It also clarifies that payload is read by the agent as data rather than treated as a command. It does not touch the wait/timeoutSeconds relationship, which stays purely in the schema.

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?

States a specific verb and resource — 'Start one of an agent's routines now' — and adds scope qualifiers ('like Test run, also when paused') that pin down exactly which execution path this is. It does not name or contrast any of the sibling tools (send_message, answer_prompt, wait_for_delivery), so an agent must infer the boundary itself.

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?

Gives clear conditional guidance for the waitId branch ('with waitId, wakes only that open wait; without it, wakes every matching open wait'), which is exactly the decision an agent faces. It also warns that calling twice runs twice. What's missing is any statement of when NOT to use it, e.g. when a delivery/wait is already in flight or when send_message would be the right call.

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