Skip to main content
Glama

Stop a terminal session

session_stop
Destructive

Terminate a session and every process running in it, then return its final output lines. Use this when the whole session should end permanently rather than interrupting a single command.

Instructions

Kill a session and every process in it, and return its last lines. Whatever was running there stops and can't be resumed; to interrupt one command but keep the session, use session_send with key C-c.

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

Input Schema

NameRequiredDescriptionDefault
nameYessession name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A4.4/5.0
Behavior4/5

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

The destructiveHint=true annotation already signals risk, but the description adds real substance beyond it: the blast radius (every process in the session), the irreversibility ("can't be resumed"), and the return of trailing output. It does not state error behavior for a nonexistent session name, which is the remaining gap.

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 sentences, front-loaded with the destructive action and its scope, then the escape hatch. Every clause carries information: what is destroyed, what is returned, and what to do instead.

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

Completeness4/5

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

With one parameter and no output schema, the description covers the essentials an agent needs: destruction scope, irreversibility, the returned lines, and the safer alternative. Minor omission is behavior when the session does not exist or is already stopped.

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 single parameter is fully documented in the schema, including its name pattern, so the schema carries the load. The description adds no meaning about the name argument — no format, no existence requirement, no effect of mismatches — so baseline 3 is appropriate at 100% coverage.

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?

Uses a concrete verb ("kill") against a specific resource ("a session and every process in it") and even states the return value ("its last lines"). The scope is unambiguous, and it is clearly distinguishable from session_send, which the description names as the non-destructive alternative.

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?

Explicitly states the exclusion ("Whatever was running there stops and can't be resumed") and routes the agent to the correct alternative with the exact mechanism ("use session_send with key C-c") when the goal is only to interrupt one command. Both the when and the when-not are present.

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