Skip to main content
Glama

session_delete

DestructiveIdempotent

Delete a gateway session record by ID and clean up any attached worktree. Use this to remove obsolete sessions and free resources.

Instructions

Delete a gateway session record by ID (also removes any gateway-owned worktree attached to it).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv3.2.0
  2. Removedv3.0.0
  3. First observedv2.16.0

TDQS

A4.3/5.0
Behavior4/5

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

The description adds an important side effect beyond the annotations: deletion also removes any gateway-owned worktree attached to the session. With destructiveHint already present, this extra context meaningfully improves transparency, though it does not cover every edge case.

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?

One sentence contains the core operation, the scoping mechanism, and a critical side effect. No filler or redundancy.

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 simple single-parameter delete operation, the description, schema, and annotations together provide enough information to invoke it correctly. The destructive and idempotent hints cover behavioral safety, and the worktree side effect is explicitly disclosed.

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 documents sessionId at 100% coverage, and the description does not add format, constraints, or additional semantics beyond 'by ID'. This matches the baseline for schema-covered parameters.

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 ('Delete'), a specific resource ('gateway session record'), and a scoping mechanism ('by ID'), which clearly distinguishes it from session_clear_all. It also adds the worktree-removal detail, making the purpose even more precise.

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 'by ID' phrasing clearly establishes this tool is for targeted deletion of a single session, providing clear usage context. It does not explicitly contrast with session_clear_all or mention exclusions, so it stops short of full alternative routing.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/verivus-oss/llm-cli-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server