Skip to main content
Glama

Session Stop

session_stop
DestructiveIdempotent

Stop a running session by terminating its REPL worker and deleting its workspace, with an option to keep saved snapshots.

Instructions

Stop a session: kill its REPL worker (if any) and delete its workspace. Also deletes every session_snapshot saved for it, unless keep_snapshots=True.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesId of the session to stop, as returned by session_start
keep_snapshotsNoKeep this session's saved session_snapshot archives instead of deleting them

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.12.0
    • addedInput schema / properties / keep_snapshots / description
      Added value: +"Keep this session's saved session_snapshot archives instead of deleting them"
    • addedInput schema / properties / session_id / description
      Added value: +"Id of the session to stop, as returned by session_start"
  2. Changed2 schema fields changedv0.11.0
    • addedInput schema / properties / keep_snapshots
      Added value: +{
      +  "default": false,
      +  "title": "Keep Snapshots",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "session_stopDictOutput",
      +  "type": "object"
      +}
  3. Changed4 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / session_id / title
      Added value: +"Session Id"
    • addedInput schema / title
      Added value: +"session_stopArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  4. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

The annotations already mark the tool as destructive and idempotent, and the description adds concrete behavioral detail: it kills the REPL worker, deletes the workspace, and removes every session_snapshot unless keep_snapshots=True. This gives the agent a clear model of the irreversible side effects and the exception to them. There is no contradiction with the annotations.

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?

Two tight sentences with no filler: the main action is front-loaded, and every subsequent clause adds operational information about scope or exceptions. The conditional 'if any' and the keep_snapshots caveat are both essential to safe invocation.

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?

Given a simple two-parameter tool with full schema coverage and annotations already declaring destructiveness and idempotence, the description covers the remaining operational essentials: what gets deleted, when deletion can be avoided, and the terminal nature of the operation. Nothing an agent needs to decide whether and how to call it is missing.

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

Parameters4/5

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

The schema already documents both parameters at 100% coverage, so the description does not need to re-explain them. It adds value by clarifying the behavioral consequence of keep_snapshots—that snapshots are otherwise deleted—and by tying session_id to the session whose worker and workspace are destroyed.

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 leads with a specific verb and resource: 'Stop a session' and then enumerates exactly what stopping entails—killing the REPL worker and deleting the workspace. This clearly distinguishes it from sibling tools like session_list or session_start, so an agent can identify the right operation 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 Guidelines3/5

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

The description makes the core use case obvious but does not explicitly state when to use it versus alternatives, such as listing sessions or starting a new one. The destructive language strongly implies this is the terminal cleanup action, but the agent must infer that rather than being told. No when-not-to-use or exclusion guidance is provided.

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