Skip to main content
Glama

Purge old page versions

purge_page_history
DestructiveIdempotent

Permanently delete page versions older than a specified cutoff across the entire wiki, freeing up storage. Requires a confirmation token to prevent accidental data loss.

Instructions

Deletes stored page versions older than a cutoff, across the whole wiki. The versions are gone permanently — this is the one maintenance operation that destroys data. Requires a confirmation token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
older_thanYesISO-8601 duration cutoff, as Wiki.js’ own admin UI offers: P1D (a day), P1M, P3M, P6M, P1Y, P2Y, P3Y. Versions older than this are deleted.
confirm_tokenNoToken from this tool’s previous, unconfirmed call. Omit it to receive one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
truncatedNoPresent only when the answer was shortened to fit the budget.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": true,
      +  "properties": {
      +    "truncated": {
      +      "additionalProperties": true,
      +      "description": "Present only when the answer was shortened to fit the budget.",
      +      "properties": {},
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv0.1.2

TDQS

A4.5/5.0
Behavior5/5

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

Even though destructiveHint is already true, the description adds significant behavioral detail: versions are 'gone permanently', this is 'the one maintenance operation that destroys data', and a confirmation token is required. This goes well beyond the annotation and warns the agent about irreversible consequences.

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 short sentences each carry essential information: the action and scope, the permanent destructive nature, and the confirmation requirement. There is no filler, and the most important constraints are front-loaded.

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?

For a destructive two-parameter tool, the description plus schema and annotations cover everything an agent needs: wiki-wide scope, cutoff semantics, token workflow, and permanence. Return-value details are presumably handled by the output schema, so nothing essential is missing.

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?

The input schema already fully documents both parameters, including the ISO-8601 cutoff options and the two-step confirmation-token flow. The description only refers generically to a 'cutoff' and 'confirmation token', adding no new parameter detail, so the baseline of 3 is appropriate.

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?

The description states a specific verb and resource: 'Deletes stored page versions older than a cutoff, across the whole wiki.' This clearly distinguishes the tool from page-level operations like delete_page and from read-only history tools like list_page_history or get_page_version.

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?

The description provides clear context: this is a wiki-wide maintenance operation for purging old page versions, not a per-page or inspection operation. It does not explicitly name alternatives or when-not-to-use conditions, but the destructive maintenance role is evident and unique among the sibling tools.

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