Skip to main content
Glama

Close browser sessions

session_close
DestructiveIdempotent

Closes a specified browser session or all sessions to free memory, preserving saved logins on disk for profile sessions.

Instructions

Close one session, or all, and free their memory. Profile sessions keep their saved logins on disk.

Input Schema

NameRequiredDescriptionDefault
allNoClose every session.
sessionNoSession to close.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: memory is freed, and profile sessions persist saved logins to disk — telling the agent that closing is not uniformly lossy.

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 short sentences with zero filler, and the scope statement precedes the caveat about persistence. Every clause carries information an agent actually needs.

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 annotations covering destructiveness and idempotency, full schema coverage, and no output schema, the definition is nearly self-sufficient; the persistence note fills the main remaining behavioral gap. Minor omission: no returned identifier or error behavior when a named session does not exist.

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 description coverage is 100%, so both parameters are already documented in the schema, including the session name pattern. The description only echoes the one-vs-all distinction without adding format, precedence, or conflict behavior (e.g., what happens if both are supplied), so it lands at the baseline.

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?

Specific verb+resource: closes sessions and frees their memory, with the one-vs-all scope stated up front. It does not distinguish itself from the sibling browser_close, which an agent could easily confuse with closing a whole session.

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?

The phrase 'one session, or all' implies the choice between the `session` and `all` parameters, which is adequate minimum-viable guidance. There is no explicit statement of when to prefer this over browser_close, session_list, or session_create, nor any exclusion or prerequisite.

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