Skip to main content
Glama

clear_session

Destructive

Irreversibly clears conversation history while keeping the session record, enabling a fresh start without deleting the session itself.

Instructions

Irreversibly clear conversation history while preserving the conversation record. Returns SESSION_BUSY during an active turn or SERVICE_UNAVAILABLE when the delivery lock is unavailable. Requires the HTTP backend.

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

Input Schema

NameRequiredDescriptionDefault
session_idYesSession session_id string or UUID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.4
    • changedInput schema / properties / session_id / description
      Previous value: -"session_id (texto) ou id UUID da sessão"New value: +"Session session_id string or UUID"
  2. Addedv2.2.3

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds real value beyond them: that the clear is irreversible, that the conversation record survives, and which error codes (SESSION_BUSY, SERVICE_UNAVAILABLE) signal a failed call. It does not say whether SESSION_BUSY is retryable, which is the one remaining operational gap.

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 short sentences, front-loaded with the destructive effect and scoped carefully; nothing is padding. The environment prerequisite sits at the end where it belongs but reads slightly as an afterthought.

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 one-parameter destructive tool with annotation coverage and no output schema, the description covers effect, side effects, failure modes, and an environment prerequisite. Adding retry guidance for SESSION_BUSY would make it complete.

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?

With a single parameter at 100% schema description coverage, the schema already documents session_id (string or UUID). The description adds no format or constraint detail beyond it, 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 ('clear') plus resource ('conversation history') and immediately scopes it against the obvious alternative interpretation by noting the conversation record is preserved. An agent can distinguish this from a full delete without opening the 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?

The irreversibility warning and the preserved-record clause give clear context on when this is appropriate, and the error conditions hint at preconditions. It stops short of naming alternatives such as archive_session for the non-destructive case, so the when-to-use-vs-what choice is left implicit.

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

Deploy Server

Other Tools