Skip to main content
Glama

stop_session

DestructiveIdempotent

Terminate a session created by start_session: kills all its programs, deletes the scratch directory, and reports peak memory and CPU time.

Instructions

Stop a session start_session made, when you're done with it: every program in it is killed, unsaved work and all, and its scratch directory is deleted, with any clip record_video saved there (one saved at a path is kept). In a session started with usage, the answer says its programs' peak memory and CPU time. You needn't stop sessions before the server ends: they all stop with it.

Input Schema

NameRequiredDescriptionDefault
sessionYesIts name, from start_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond destructiveHint=true: it enumerates exactly what is destroyed (every program killed, unsaved work lost, scratch directory deleted, saved clips removed except one saved to a path). It also discloses what a call returns for sessions started with usage (peak memory and CPU time), which matters because there is no output schema.

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?

The critical verb and resource are front-loaded, and every clause carries new information (destruction scope, return values, lifecycle exemption). The sentences are long and comma-stacked, but there is little that could be cut without losing behavioral detail.

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 destructive one-parameter tool with no output schema, the description covers destruction semantics, the exception for saved clips, the return payload, and the lifecycle question of whether the call is ever required. Nothing an agent needs before invoking it is missing.

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?

Schema coverage is 100% for the single 'session' parameter, so the schema already carries the semantics. The description only reinforces the provenance of the name ('from start_session'), adding no format or syntax detail beyond the structured field, which is the baseline 3 case.

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?

Starts with a specific verb+resource ('Stop a session start_session made') and immediately ties it to the sibling that creates that resource, so an agent can pair the two without ambiguity. It is unmistakably distinct from all other siblings, which are interaction/capture tools.

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

Usage Guidelines5/5

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

Gives explicit when ('when you're done with it') and an explicit when-not ('You needn't stop sessions before the server ends: they all stop with it'), which prevents an agent from making pointless calls at shutdown. No alternative tool exists for this purpose, so nothing further needs to be named.

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