Skip to main content
Glama

purge_sessions

Permanently deletes finished machine-created sessions in nightly housekeeping: archived scheduled runs and hidden sub-agent sessions past a cutoff, preserving chats, live runs, and Assistant thread.

Instructions

Permanently delete finished machine-created sessions. Two sweeps: archived scheduled runs older than the cutoff, and sub_agent/hidden sessions older than the cutoff (those are never archived, so age is the only condition). Never touches a chat, a live run, or the Assistant thread. Nightly housekeeping, not something to reach for when a list looks untidy.

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

Input Schema

NameRequiredDescriptionDefault
older_than_daysNoDelete archived runs older than this. Defaults to 7.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the whole burden and does well: it discloses irreversibility ("permanently delete"), itemizes what is destroyed, and names three categories that are explicitly safe. It does not state what happens to sessions younger than the cutoff, whether a confirmation or dry run exists, or what the call returns.

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?

Four sentences, each load-bearing: action, sweep breakdown, exclusion list, then usage boundary. The destructive nature and scope are front-loaded; nothing is padding.

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?

For a single optional-parameter mutation tool with no output schema, the description covers action, scope, exclusions, and usage context. The remaining gap is outcome information — roughly how much is deleted and whether the result is reported — which matters for a destructive tool.

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 clarifies that the same cutoff governs both sweeps, whereas the schema text only mentions "archived runs." That resolves an ambiguity an agent would otherwise hit when setting older_than_days.

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?

"Permanently delete finished machine-created sessions" gives a specific verb, resource, and scope, then enumerates the exact two sweeps covered (archived scheduled runs; sub_agent/hidden sessions). Explicit exclusions (chat, live run, Assistant thread) let an agent separate this from tidy_sessions without opening either schema.

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?

It states the use case ("nightly housekeeping") and an explicit when-not ("not something to reach for when a list looks untidy"), which implicitly routes untidy-list cleanup elsewhere. The alternative tool is characterized by behavior rather than named, so the routing is clear but not fully explicit.

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