Skip to main content
Glama

agent_runs

Read-only

Review consecutive commits by one person or AI to see what an agent changed, including docs and commit logs, and get the run ID and starting SHA needed to undo it.

Instructions

Runs: what one writer did in one go, newest first. A run is a set of consecutive commits by the same person, AI and token, with no pause over 30 minutes; it comes with the docs it changed and its newest commits (log: sha, date, subject). ai names the AI that wrote it; none means a human, or an agent that committed from a clone without saying so. Use it to review what an agent did and get the id and from sha undo_run takes; activity lists single commits, resume_session saved work. One call is enough: a host that shows views opens one per call. A run lists 20 docs (documents_more counts the rest); pass run for one run's full log and up to 100 docs, when log_more says commits are missing.

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": "agent_runs"
  }
}

Input Schema

NameRequiredDescriptionDefault
runNoA run id: that run alone, with its commits.
daysNoRuns that ended within this many days.
limitNoMost runs to return, newest first.

Output Schema

NameRequiredDescriptionDefault
daysYes
runsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.8.0
    • addedInput schema / properties / limit / description
      Added value: +"Most runs to return, newest first."
  2. First observedv2.7.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare a safe read (readOnlyHint true, openWorldHint false), and the description still adds real behavioral context: pagination caps (20 docs per run, documents_more counting the rest), the log_more signal for truncated commit lists, and the caveat that `ai: none` may mean a human or an agent committing from a clone without attribution. It stops short of describing error behavior or what a default (no `run`, no `days`) call looks like in return shape, keeping it off 5.

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-loaded with the resource definition, then usage, then pagination caveats — a sensible progression with no filler sentences. It is dense in backticked field references and parentheticals, which costs a little readability but every clause carries information.

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?

Even though an output schema exists and return values needn't be spelled out, the description still discloses the log fields (sha, date, subject), the truncation flags, and the AI-attribution quirk. For a read tool with three optional params, an agent has everything needed to call it correctly on the first try.

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 baseline is 3, but the description adds meaning beyond the schema: passing `run` widens the response to a full log and up to 100 docs, and that should be triggered when log_more reports missing commits. `days` and `limit` are left to the schema, so it isn't a full 5.

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 by defining the resource precisely ("what one writer did in one go, newest first") and then pins down the grouping rule: consecutive commits by the same person/AI/token with no pause over 30 minutes. It explicitly contrasts the resource with single commits (activity) and saved work (resume_session), so an agent can separate it from siblings without opening schemas.

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?

States the use case ("review what an agent did and get the `id` and `from` sha undo_run takes") and names two alternatives with their differing scope: activity lists single commits, resume_session saved work. It also adds a calling directive — one call suffices, hosts that show views open one per call — which prevents redundant invocations.

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