Skip to main content
Glama

run_due_agents

Destructive

Enqueue a background run for every agent of this tenant whose schedule is due (trigger_mode 'server_job', status active or provisioned, next_run_at in the past), and move each one's next_run_at forward by its interval. An agent with a working window (run_from/run_to/run_days, in its own timezone) that falls due OUTSIDE that window is not started: its next_run_at moves to the next opening and the run is skipped, not caught up. This is what the five-minute clock calls; a human can call it to make a schedule fire now instead of waiting. Returns which agents were started and which were deferred, with the reason. It does not wait for them to finish — watch /app/agent-runs for that. STARTS AGENTS that act on this tenant's data, so it goes through the permission gate.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "run_due_agents"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoOnly report which agents are due; enqueue nothing and change no schedule.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructive=true and idempotent=false, and the description builds on that: it mutates next_run_at, skips out-of-window runs rather than catching up, returns started vs deferred with reasons, and passes through a permission gate. The one gap is that it never names the dry_run parameter as the safe preview path in the behavior prose.

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?

Front-loads the core action and eligibility rule, then layers window logic, async semantics, return shape, and the safety caveat as short standalone sentences. Every sentence carries new information; nothing restates the schema or annotations.

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?

With no output schema, the description covers the return contract ('which agents were started and which were deferred, with the reason') and explicitly says it does not wait for completion. For a destructive, async, schedule-mutating tool it supplies everything an agent needs before invoking.

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?

The single parameter has 100% schema description coverage, so the baseline is 3. The description adds nothing about dry_run — the preview/read-only mode is only discoverable from the schema, not from the prose.

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 precise verb and resource ('enqueue a background run for every agent of this tenant whose schedule is due') plus the exact eligibility predicate (trigger_mode 'server_job', status active/provisioned, next_run_at in the past). That predicate alone separates it from test-run siblings such as run_agent_test_plan or get_agent_test_run.

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 usage context: 'This is what the five-minute clock calls; a human can call it to make a schedule fire now instead of waiting,' and routes observation elsewhere with 'watch /app/agent-runs for that.' It does not explicitly exclude the per-agent test-run siblings, so it stops short of full when/when-not guidance.

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.