Skip to main content
Glama

session_close

Close an active session and terminate its processes while preserving readable history and usage records.

Instructions

Close a session and terminate its processes; history and usage remain readable.

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

Input Schema

NameRequiredDescriptionDefault
session_idYes
client_request_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden, and it does disclose the key behavioral fact: processes are terminated but history and usage remain readable, so the agent knows what is destroyed versus preserved. It omits permissions/authorization requirements, idempotency or error behavior for an already-closed session, and whether the termination is graceful or immediate.

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?

A single front-loaded sentence with a clause that adds real information about post-close state; there is no filler or restatement of the name.

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 no-annotation mutation tool with no output schema, the description covers the essential outcome (processes gone, records retained) but leaves parameter meaning, authorization needs, and re-close behavior unaddressed. Adequate to call correctly, not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the two parameters, so the description would need to explain them, and it says nothing about session_id or client_request_id (e.g. whether the latter is for idempotency/retry safety). The only implicit signal is that a session is the target of the operation.

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?

States a specific verb and resource ('Close a session') and adds scope: it terminates processes while history and usage stay readable. It does not name or differentiate from the sibling session_interrupt, so an agent must infer the boundary from the name alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied by the verb 'close' — use it to end a session — and the post-condition note hints at when it is appropriate (when you want to stop work but keep records). There is no explicit when-not guidance and no comparison with session_interrupt, which is the closest alternative.

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