Skip to main content
Glama

stop_session

Stop a running session gracefully by sending TERM, then force KILL after 5 seconds if it does not exit. Use it to end detachable process sessions.

Instructions

Stop a running session gracefully with TERM, then KILL after 5 seconds if needed.

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

Input Schema

NameRequiredDescriptionDefault
idYesSession id.

Output Schema

NameRequiredDescriptionDefault
okYes
stderrYes
stdoutYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses the TERM-then-KILL escalation and the 5-second grace window, but says nothing about whether the call blocks for up to 5 seconds, what happens if the id is unknown or already dead, or whether the session's state/output is lost — all critical for a termination tool.

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?

One short sentence with zero filler, and the most consequential detail (graceful signal followed by a forced kill after 5 seconds) is stated up front rather than buried.

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?

The tool is simple, has one fully documented parameter, and ships an output schema, so return values need not be explained. The main remaining gap is failure/idempotency behavior and whether termination is irreversible, which a low-complexity tool could reasonably state in a clause or two.

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 a single required parameter with 100% schema description coverage, so the schema already defines the session id. The description adds no format, source, or validation detail beyond it, which is the expected baseline when the schema does the work.

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 pairs the specific verb "Stop" with the resource "a running session" and adds the escalation mechanism (TERM, then KILL after 5 seconds). It does not clarify how it differs from the sibling signal_session, which presumably can also deliver TERM/KILL, so an agent cannot fully route between them from the text 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?

Use is implied by the name and the graceful-then-forced sequence: this is the routine way to end a session. There is no explicit when-to-use vs. when-not guidance, and no mention of signal_session as the alternative for non-default signals or forget_session for cleanup, leaving the routing to inference.

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