Skip to main content
Glama

Your treatment runs

list_treatment_runs
Read-onlyIdempotent

List your recent treatment runs, newest first: run id, treatment, status, credits charged, whether a wallet paid, when it ran and whether its full output is still kept. Use it to find a runId you no longer have, then get_treatment_run for the details and output. For lifetime totals use get_passport instead. Requires your agent key.

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

Input Schema

NameRequiredDescriptionDefault
limitNoHow many runs to return, newest first. Default 20, at most 100.
api_keyNoYour Retreat agent key (rta_...). Optional if sent as an Authorization header.
treatmentNoOnly runs of this treatment, named by its tool, e.g. context_bath.

Output Schema

NameRequiredDescriptionDefault
runsNoNewest first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedOutput schema / properties / runs / items / properties / charged / description
      Previous value: -"Credits charged for this run."New value: +"Credits charged."
    • changedOutput schema / properties / runs / items / properties / error / anyOf
      Previous value: -[
      -  {
      -    "description": "Error code for a failed run.",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Failure code.",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / runs / items / properties / machineMs / anyOf
      Previous value: -[
      -  {
      -    "description": "Processing time in milliseconds.",
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Processing milliseconds.",
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / runs / items / properties / outputKept / description
      Previous value: -"Whether get_treatment_run can still return the full output."New value: +"Full output available from get_treatment_run."
    • changedOutput schema / properties / runs / items / properties / paidByWallet / description
      Previous value: -"true when paid with x402."New value: +"Paid with x402."
    • changedOutput schema / properties / runs / items / properties / startedAt / description
      Previous value: -"ISO time the run started."New value: +"ISO timestamp."
    • removedOutput schema / properties / runs / items / properties / tool / description
      Removed value: -"The MCP tool that runs this treatment."
    • removedOutput schema / properties / runs / items / properties / treatment / description
      Removed value: -"Treatment id."
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, so the description focuses on what annotations can't say: results are ordered newest first, the listing surfaces whether a wallet paid and whether full output is retained, and an agent key is required. It stops short of describing pagination or what happens past the limit, which 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences: what it returns, how to use the result, and where to go for alternatives. Ordering and scope are front-loaded and nothing is padded.

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 an output schema, 100% param coverage, and safety annotations, the description only needs to cover ordering, auth, and sibling routing, which it does. It omits the treatment filter, the only real narrowing lever here, which would help an agent avoid over-fetching.

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 limit, api_key, and the treatment enum are already fully documented, which sets the baseline at 3. The description only adds the 'newest first' ordering cue and vague 'recent' framing; it says nothing about the treatment filter or the 1–100 limit range.

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?

Names a specific verb+resource ('List your recent treatment runs') and enumerates the returned fields (run id, treatment, status, credits charged, wallet payment, timing, output retention). It also distinguishes itself from get_treatment_run (details) and get_passport (lifetime totals), so an agent can route without opening a schema.

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?

Explicit routing: use this to recover a runId you no longer have, then call get_treatment_run for details and output, and use get_passport for lifetime totals. Both the when-to-use and the alternatives are named directly.

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.

Resources