Skip to main content
Glama
runwhen-contrib

RunWhen Platform MCP

Get Run Sessions

get_run_sessions

Retrieve recent run session results for a workspace as structured JSON, covering outputs from SLX runbook health checks, troubleshooting tasks, and automation runs.

Instructions

Get recent run sessions for a workspace (structured JSON).

Run sessions are executions of SLX runbooks — they contain the output of health checks, troubleshooting tasks, and automation runs.

NOTE: For investigative questions like "what ran recently for service X?" or "show me recent failures", prefer workspace_chat — it can search, filter, and correlate run sessions with issues and resources. Use this tool only when you need raw JSON for programmatic processing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax run sessions to return.
workspace_nameYesThe workspace to query (e.g. 't-oncall').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose the return shape ('structured JSON') plus the semantic scope ('recent'). It covers safety implicitly via the read-only framing and the alternative-selection rule. It does not state ordering, what window 'recent' covers, or the default limit behavior, which is what keeps it from a 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 purpose sentence, then a compact domain gloss, then the routing note. Every block earns its place, though the parenthetical '(structured JSON)' is restated later in the NOTE, a minor redundancy.

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?

An output schema exists, so return values need not be explained, and the description covers purpose, domain meaning, and routing. It is nearly complete for a low-parameter read tool; only the ambiguity of 'recent' and any pagination behavior leave a small gap.

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%, so both parameters (limit, workspace_name) are already documented in the schema, which sets the baseline at 3. The description adds no syntax, format, or ordering detail about `limit` or the workspace identifier, so it earns no credit above 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?

States a specific verb and resource ('Get recent run sessions for a workspace') and then defines the domain object ('executions of SLX runbooks — output of health checks, troubleshooting tasks, automation runs'). It explicitly distinguishes itself from the sibling workspace_chat, so an agent can tell the two apart 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?

Gives an explicit when-not ('For investigative questions like "what ran recently for service X?" ... prefer workspace_chat') with a rationale (it can search, filter, correlate) and an explicit when-to-use ('only when you need raw JSON for programmatic processing'). This is a textbook routing instruction.

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