Skip to main content
Glama

Ctx Purge Session

ctx_purge_session
DestructiveIdempotent

Permanently deletes all stored data for a specified session, including chunks, anchors, invariants, and the session record, to remove it completely.

Instructions

Permanently delete all data for a session (chunks, anchors, invariants, session row).

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": {
      "session_id": "<session_id>"
    },
    "name": "ctx_purge_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYesthe session to purge (must be explicit, not "default")

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is structured. The description adds useful behavioral detail beyond that by specifying exactly what is deleted and emphasizing that the deletion is permanent, though it does not mention irreversibility warnings, confirmation requirements, or effects on related sessions.

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?

The description is a single front-loaded sentence with zero wasted words. It states the action, permanence, scope, and affected data classes efficiently.

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?

Given one required parameter, full schema coverage, an output schema, and rich destructive annotations, the description covers the essential deletion scope and permanence. The main gap is guidance on when to choose this tool over sibling purge or session-listing tools, which would complete the definition for a destructive operation.

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%, and the schema already documents that session_id must be explicit and not "default". The description adds no parameter-specific meaning beyond identifying the session as the target, which is already clear from the tool name and schema.

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, naming the exact scope: permanently delete all data for a session. It enumerates the affected data classes (chunks, anchors, invariants, session row), which clearly distinguishes it from sibling tools such as ctx_purge_expired or ctx_vacuum.

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?

The description does not say when to use this tool instead of alternatives like ctx_purge_expired, ctx_list_sessions, or ctx_vacuum. It also omits any preconditions, such as confirming the session exists or checking before deletion, leaving the agent with no routing guidance.

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