Skip to main content
Glama
xav-ie

Browser Session MCP

close_browser_session

DestructiveIdempotent

Closes a browser session permanently, removing all its tabs, cookies, storage, console/network logs, and saved CPU profiles so resources do not linger. Use it for reliable cleanup when the task is done.

Instructions

Close a browser session for good: closes all its tabs, discards its cookies and storage, and deletes its console and network logs and saved .cpuprofile files. Call it when the task is done so the session doesn't sit open until the reaper closes it. Use close_tab instead to close one tab and keep the session, and save_browser_state first if the login should outlive the session. Idempotent: closing an unknown or already-closed session succeeds, so it is safe in cleanup code. Returns a confirmation.

Input Schema

NameRequiredDescriptionDefault
sessionIdYesThe id returned by open_browser_session. An unknown or already-closed id succeeds without error.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • changedInput schema / properties / sessionId / description
      Previous value: -"The id returned by open_browser_session. Errors if no open session has it."New value: +"The id returned by open_browser_session. An unknown or already-closed id succeeds without error."
  2. Changed1 schema field changed
    • addedInput schema / properties / sessionId / description
      Added value: +"The id returned by open_browser_session. Errors if no open session has it."
  3. First observedv0.1.2

TDQS

A4.7/5.0
Behavior5/5

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

The annotations already declare destructiveHint=true and idempotentHint=true, but the description adds substantive context about exactly what is destroyed: tabs, cookies, storage, console/network logs, and saved .cpuprofile files. It also explains idempotency in operational terms, saying unknown or already-closed sessions succeed and the tool is safe in cleanup code.

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 front-loaded with the core action and destruction scope, then moves through usage, alternatives, idempotency, and return behavior. Every sentence carries operational information, and there is no filler.

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?

For a destructive cleanup tool with rich annotations and a fully documented single parameter, the description supplies what an agent needs: what is deleted, when to call it, when to use alternatives, idempotency safety, and that it returns a confirmation. No output schema is present, but the description notes the return shape.

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%, and the single parameter already documents that sessionId comes from open_browser_session and that unknown or already-closed ids succeed. The description repeats the idempotency detail but does not add meaningful parameter syntax or format guidance beyond the schema, so the 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?

The description states a specific verb and resource: close a browser session. It specifies the scope beyond the name by explaining that all tabs, cookies, storage, logs, and .cpuprofile files are destroyed, and it distinguishes this from close_tab.

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

Usage Guidelines5/5

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

It gives explicit timing guidance: call it when the task is done so the session does not remain open for the reaper. It also names alternatives and their conditions: use close_tab to close one tab and keep the session, and save_browser_state first if the login should outlive the session.

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