Skip to main content
Glama

get_run_history

Read-onlyIdempotent

Retrieve structured run history for a monitor to diagnose stalled runs and review step progress, incident details, and duration across CI/CD and agent runs.

Instructions

Get structured run history for a monitor — both CI/CD runs and agent/heartbeat runs. Each run carries its run id (rid), kind, received_at, the progress steps reported under it (steps: seq, name, at), and the correlated incident log excerpt (incident_detail) with resolution status. A run that stalled tells you which step it reached and when it stopped moving — no need to follow links to the CI provider. steps is absent for a run that reported none — steps are matched on rid, so they appear only when the job or agent posted /step?rid= with the same run id it started with. CI-specific fields — failing step (failing_stage), triggering actor, commit SHA, run URL, branch, duration_s, outcome — are present only on runs that carried ci_meta; they are simply absent on agent/heartbeat runs. A ping with neither ci_meta nor a rid is excluded entirely. duration_ms is a SEPARATE measurement, present on ANY run (CI or agent/heartbeat) whose success ping paired with its preceding start — this is how to answer 'how long does this job normally take?' for a non-CI monitor. It is computed by LastPing from the /start->success timing, not self-reported by a provider like duration_s is; the two must not be confused as confirming each other, and either can be present without the other.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMonitor UUID.
limitNoMax runs to return (default 20, max 100).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

With readOnlyHint and idempotentHint already covering safety, the description goes far beyond annotations to explain field-presence semantics: ci_meta-only fields, steps matching on rid, exclusion of pings lacking both ci_meta and rid, and the critical provenance distinction between duration_ms (computed by LastPing) and duration_s (provider-reported). This is exactly the behavioral nuance an agent needs to interpret data correctly.

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 long (~180 words) but nearly every clause earns its place by preventing a real misinterpretation, such as conflating duration_s with duration_ms. The core scope is front-loaded, and the conditional-field detail follows logically. It is dense rather than bloated, though it could be tightened.

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, so the description carries the full burden of explaining return values — and it does so exhaustively: run fields, conditional presence rules, exclusion criteria, and cross-field relationships. For a tool with this much conditional complexity, nothing an agent needs to interpret the response is missing.

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?

Schema description coverage is 100% for both parameters (id as Monitor UUID, limit with default/max), so the schema carries the full burden. The description adds context about what a run contains but not about the parameters themselves, landing at the baseline.

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 names a specific verb ('Get') and resource ('structured run history for a monitor') and immediately distinguishes the two run kinds it covers: CI/CD runs and agent/heartbeat runs. This is precise enough to separate it from sibling list/get tools 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context well — it explicitly teaches the agent how to answer 'how long does this job normally take?' for a non-CI monitor via duration_ms. However, it never names an alternative or states when NOT to use this tool, so routing guidance is left to inference rather than stated.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tp322d/lastping-app'

If you have feedback or need assistance with the MCP directory API, please join our Discord server