Skip to main content
Glama

pii_purge_sessions

Destructive

Deletes PII encryption sessions older than a specified number of days, matched by creation time. Requires confirm=true to run; rejects an age below 1 day.

Instructions

Delete PII encryption sessions older than N days (Step 103, ADR-103). Sessions are matched by creation time only; the encryption key is not required. Returns purged (count of deleted sessions) or ok:false when olderThanDays is invalid (< 1).

Input Schema

NameRequiredDescriptionDefault
confirmYesmandatory acknowledgement that this call mutates state; the tool writes nothing unless it is true (D5-08, D5-12)
olderThanDaysYesDelete sessions created before this many days (>= 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "mandatory acknowledgement that this call mutates state; the tool writes nothing unless it is true (D5-08, D5-12)",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "olderThanDays"
      -]New value: +[
      +  "olderThanDays",
      +  "confirm"
      +]
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds real context beyond that: age-only matching, no key requirement, and the ok:false failure mode for invalid input.

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?

Three front-loaded sentences with the action first and no padding. The Step 103 / ADR-103 parentheticals are internal references that add mild noise but no real length.

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 no output schema, the description correctly covers the return contract (purged count or ok:false on invalid input), which is what an agent most needs. It is largely complete, missing only pagination-style edge cases that don't apply to a purge.

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 coverage is 100%, so both parameters are already documented, including the >= 1 constraint. The description only adds the consequence of an invalid olderThanDays and says nothing extra about confirm beyond what the schema already states, so the baseline 3 applies.

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 (Delete), resource (PII encryption sessions), and scope (older than N days). Against siblings like pii_delete_session and pii_sessions, this reads as a bulk, age-based purge, so an agent can distinguish it without opening any schema.

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

Usage Guidelines3/5

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

"Sessions are matched by creation time only; the encryption key is not required" clarifies the matching criterion, which hints at when it applies. But it never names alternatives (e.g., pii_delete_session for a single session) or says when not to use this bulk purge, leaving sibling selection to inference.

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