Skip to main content
Glama

session_destroy

Closes a browser session by ID and quits its browser, discarding cookies, login state, and open pages. If it was active, another open session becomes active or none remains.

Instructions

Close one browser session by id and quit its browser; its cookies, login state, and open pages are lost. If it was the active session, another open session becomes active, or none if it was the last. To close just the active session, stop_browser does the same.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession id, as returned by session_create or session_list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / sessionId / description
      Added value: +"Session id, as returned by session_create or session_list."
  2. Addedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the destructive side effects (cookies, login state, and open pages are lost; the browser process quits) and the active-session reassignment behavior, including the last-session edge case. It omits return value/error semantics, but the core behavioral profile is covered.

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 tight sentences, zero filler, front-loaded with the destructive effect and closing with alternative routing. Every sentence earns its place.

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?

For a single-parameter mutation tool with no annotations and no output schema, the description covers purpose, destruction, and side effects adequately. Minor gaps remain around failure modes and whether an id validation error occurs, so it is strong but not exhaustive.

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% and the single parameter is fully documented in the schema (id returned by session_create or session_list). The description restates 'by id' but adds no format or syntax detail beyond the schema, so baseline 3 applies.

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 (close/destroy) and resource (one browser session) plus the concrete consequence 'quit its browser.' It is immediately distinguishable from stop_browser, which acts on the active session rather than a specified id.

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?

Explicitly routes the agent to an alternative: 'To close just the active session, stop_browser does the same.' That is a clear when-to-use-this-vs-that statement, though it gives no guidance on error conditions (unknown id, already-closed session) or whether the target must first be selected.

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