Skip to main content
Glama

Ctx Purge Expired

ctx_purge_expired
DestructiveIdempotent

Purge all sessions whose TTL has elapsed to reclaim storage and keep the context store clean.

Instructions

Purge all sessions past their TTL.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered by structured data. The description adds one genuinely useful behavioral fact the annotations cannot convey: the deletion is scoped to expired sessions only, so live sessions survive. It says nothing about whether counts are returned, whether the purge is batched, or whether it must be paired with ctx_vacuum to reclaim disk.

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?

A single six-word sentence with zero filler, and the scope qualifier is placed where it matters most for a destructive tool. Nothing is redundant or buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no parameters, an output schema present, and rich annotations, the description is close to sufficient, but the crowded sibling set (ctx_purge_session, ctx_vacuum, ctx_rebuild_index) makes the missing routing information a real gap. An agent still has to guess whether this is the right purge tool to call.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate and the baseline of 4 applies. No parameter-related detail is missing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Purge all sessions past their TTL" names a specific verb (purge), a specific resource (sessions), and a selection predicate (past their TTL), so the operation itself is unambiguous. It does not explicitly distinguish itself from the sibling ctx_purge_session, which appears to target a single session, so an agent must infer the bulk-vs-single split.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no statement of prerequisites (does it need to run before ctx_vacuum to reclaim space?), and no reference to the sibling ctx_purge_session or any alternative. The "past their TTL" clause implies a routine maintenance use case, but that is inference rather than stated guidance.

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