Skip to main content
Glama

Delete runs

delete_runs
DestructiveIdempotent

Permanently delete finished runs (up to 100), before their retention ends: each run's events, output, error and definition are deleted at once, and the run is no longer found (get_run, list_runs, a batch's runs). A run that has not finished is refused: cancel it first. Billing is unaffected: what a run cost stays charged. The files a run saved (its outputs) stay in the organization's files unless delete_files is true. Returns the ids deleted and, for any that were not, why.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ids": "<ids>"
    },
    "name": "delete_runs"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesThe runs' ids.
delete_filesNoAlso delete the files these runs saved (default false: they stay).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructive and idempotent, but the description adds substantial context beyond them: the cascade effect (run disappears from get_run, list_runs and batch listings), the refusal of in-flight runs, that billing charges persist, and that saved files survive unless delete_files is set. This is precisely the impact information an agent needs before a destructive call.

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?

A single front-loaded paragraph that opens with the verb and resource, then layers constraints, side effects and return shape. Every sentence carries information, though the dense colon-chained phrasing makes it marginally harder to scan than a short bulleted list would.

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 supplies the return contract itself: the ids deleted and per-id reasons for failures. Combined with the refusal rule, billing note and file-retention behavior, an agent has everything needed to call this destructive tool correctly.

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 the baseline is 3, but the description adds real meaning: it explains the consequence of delete_files (saved outputs remain in the organization's files by default) and ties the 100 limit to the batch size. That is effect-level semantics the schema's 'Also delete the files these runs saved' only hints at.

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 with scope qualifiers: 'Permanently delete finished runs (up to 100), before their retention ends'. It also enumerates exactly what is deleted (events, output, error, definition), which distinguishes it from siblings like cancel_run or delete_state.

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 an explicit precondition and exclusion: unfinished runs are refused and must be cancelled first, routing the agent to the cancel path. It also flags the timing constraint (before retention ends). It stops short of naming a sibling tool to use instead when the target is not a finished run, but the condition is stated clearly enough to act on.

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