Skip to main content
Glama

Destroy terminal session

terminal_destroy
Destructive

Permanently terminate a terminal session and forget its session ID, so future calls fail instead of auto-respawning. Use when explicitly done with that session.

Instructions

Kill a session and forget the sessionId entirely. The shell process is terminated and the sessionId is not tombstoned — future calls against it will error with "Unknown sessionId". Use this when you're explicitly done with a session. Tombstones (which auto-respawn on next access) only happen for system-driven terminations: idle-kill, eviction, or shell exit.

Input Schema

NameRequiredDescriptionDefault
sessionIdYesNumeric id from terminal_create or terminal_list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true and idempotentHint=false; the description adds the crucial non-obvious behavior that the id is not tombstoned, future calls error with 'Unknown sessionId', and that auto-respawn only applies to system-driven terminations. This is exactly the extra context annotations cannot convey.

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?

Three sentences, zero filler, front-loaded with the primary action before the tombstone clarification. Each sentence carries distinct information (action, id invalidation, contrast with system terminations).

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?

No output schema exists, and the description compensates by describing the post-call state and the exact error an agent will see on misuse. For a single-parameter destructive tool, nothing needed to call it correctly 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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it tells the agent what the sessionId becomes after the call (permanently invalid, errors on reuse). That is semantic value beyond the schema's 'Numeric id from terminal_create or terminal_list.'

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?

States a specific verb+resource ('Kill a session') and immediately clarifies the distinguishing semantic: the sessionId is forgotten, not tombstoned. Combined with the sibling set (terminal_reset, terminal_list), an agent can tell this is the terminal teardown tool rather than a reset or query.

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

Usage Guidelines4/5

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

'Use this when you're explicitly done with a session' gives an explicit trigger condition, and the tombstone contrast carves out system-driven terminations (idle-kill, eviction, shell exit) as cases where this tool should NOT be called. It stops short of naming terminal_reset as the alternative for keeping a session alive, so it's clear but not fully routed.

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