Skip to main content
Glama

Close session

browser_close

Close a browser session, including its context and tabs, or close the active session when none is specified. Use it to end automation workflows and release browser resources.

Instructions

Close a browser session (its context and tabs). Closes the active session when none is given.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true; the description adds the meaningful detail of what actually gets torn down (context plus tabs), which is beyond the structured fields. It does not say whether the call is idempotent, what happens if the session id is unknown, or whether any state is preserved; note also a mild tension with destructiveHint=false given that tabs and context are discarded.

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, no filler, with the scope-defining detail front-loaded and the default-argument behavior immediately after. Nothing is redundant.

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 one-parameter, no-output-schema teardown tool with annotations covering safety, this is close to sufficient: scope and default behavior are both stated. Minor omissions remain around failure modes and return behavior, which matter somewhat for an openWorld operation.

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 0% for the single optional 'session' parameter, so the description must carry the load. It does explain the default (active session when omitted), but never states what a session identifier looks like or how to obtain one, leaving a real gap.

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 names a specific verb (close) and resource (browser session), and clarifies the scope by parenthesizing 'its context and tabs', which implicitly separates it from the tab-level sibling browser_tab_close. It stops short of naming an alternative explicitly, so differentiation is inferable rather than stated.

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?

It gives one useful usage rule — the active session is closed when no session is specified — which tells an agent it can call with zero arguments. There is no explicit guidance on when to prefer browser_tab_close versus closing the whole session, nor on preconditions.

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