Skip to main content
Glama

browser.close_session

Destructive

Close an active browser session to finalize trace files and artifacts.

Instructions

Close a session and finalize its trace/artifacts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNoTarget session id, from browser.create_session or browser.list_sessions. Optional when exactly one session is live; observe and act tools create one when none is.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.1
  2. Removedv1.4.2
  3. Changed1 schema field changedv1.4.2
    • addedInput schema / properties / session_id / description
      Added value: +"ID of the target browser session, as returned by browser.create_session or listed by browser.list_sessions."
  4. Changed3 schema fields changedv1.0.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / session_id / maxLength
      Added value: +120
    • addedInput schema / properties / session_id / minLength
      Added value: +1
  5. First observedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already convey destructiveHint=true, readOnlyHint=false, and non-idempotence. The description adds the useful detail that trace/artifacts are finalized, but it does not clarify irreversibility, effect on open tabs, or whether closing returns any confirmation. No contradiction with annotations.

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?

The description is a single compact sentence with no filler. The primary action is front-loaded, and the trace/artifact finalization detail earns its place by clarifying an important side effect.

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 tool with one optional parameter and a rich schema description, the description is largely sufficient: it states the action and the key finalization behavior. The main gap is the absence of any expected return or error information, but given the annotations and simple scope this is a minor omission.

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 session_id is already fully described in the schema, including its optionality and how to obtain the id. The tool description itself adds no parameter-level meaning, so the baseline of 3 applies because schema coverage is 100%.

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 clearly names the verb ('Close') and the resource ('a session'), and adds a specific secondary effect ('finalize its trace/artifacts'). It implicitly differentiates from browser.close_tab by targeting the session level, though it does not explicitly distinguish itself from other session-management siblings.

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

Usage Guidelines2/5

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

The description gives no explicit guidance on when to prefer close_session over alternatives like close_tab, nor any prerequisites such as having a live session. Usage is only implied by the action name and the 'finalize' phrasing, not stated.

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