Skip to main content
Glama

session_close

DestructiveIdempotent

Close a live session to revoke lookup, retire turns and pending decisions, and drain resources.

Instructions

Revoke lookup, retire turns and pending decisions, and drain resources for a live session.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "session_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=true, so the description only needs to add detail beyond that. It does: it enumerates what is destroyed (lookup, turns, pending decisions, resources), which tells an agent the consequences for any in-flight work. It stops short of saying what a repeat call returns or how pending questions resolve.

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?

A single front-loaded sentence with no filler; the teardown effects are listed in the order an agent would care about them. The phrasing is jargon-dense ('revoke lookup', 'drain resources') but each clause carries distinct information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, non-idempotent-looking mutation with no output schema, the description covers what is destroyed but omits what the call returns, how errors surface for an already-closed session, and whether the operation is safely repeatable. Annotations carry the safety profile, so the remaining gap is moderate rather than severe.

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?

There is one required parameter with 0% schema description coverage; the description says nothing about sessionId, its format, or where to obtain it. The name is largely self-explanatory, so this is a minor rather than blocking gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb set (revoke, retire, drain) applied to a specific resource (a live session), so an agent knows this is a terminal teardown operation. It does not explicitly distinguish itself from session_interrupt or session_list, but the 'live session' scoping makes the intent legible 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 Guidelines2/5

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

The only guidance is the precondition implied by 'for a live session'; there is no statement of when to close versus interrupt (session_interrupt), what happens if the session is already closed, or whether it should be called after answering pending questions. Nothing routes the agent between this and its closest siblings.

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