Skip to main content
Glama

Close a browser

close_browser
Destructive

Closes a browser session and settles its charge for the seconds it ran and its steps. Call it when the task is done: an open session is charged until it times out. Files the page downloaded stay 10 minutes. A repeat call answers the same.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>"
    },
    "name": "close_browser"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYesThe browser session's id, as the opened browser returned it.

Output Schema

NameRequiredDescriptionDefault
idNo
bytesNo
priceNo
limitsNo
statusNo
actionsNo
secondsNo
ended_atNo
headlessNo
live_urlNo
metadataNo
viewportNo
timeout_sNo
created_atNo
expires_atNo
keep_aliveNo
started_atNo
actions_urlNo
block_mediaNo
charged_usdNo
connect_urlNo
ended_reasonNo
idle_timeout_sNo
allowed_domainsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "actions": {
      +      "type": "integer"
      +    },
      +    "actions_url": {
      +      "type": "string"
      +    },
      +    "allowed_domains": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "block_media": {
      +      "type": "boolean"
      +    },
      +    "bytes": {
      +      "type": "integer"
      +    },
      +    "charged_usd": {
      +      "type": "number"
      +    },
      +    "connect_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "created_at": {
      +      "type": "string"
      +    },
      +    "ended_at": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "ended_reason": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "expires_at": {
      +      "type": "string"
      +    },
      +    "headless": {
      +      "type": "boolean"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "idle_timeout_s": {
      +      "type": "integer"
      +    },
      +    "keep_alive": {
      +      "type": "boolean"
      +    },
      +    "limits": {
      +      "type": "object"
      +    },
      +    "live_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "metadata": {
      +      "type": "object"
      +    },
      +    "price": {
      +      "type": "object"
      +    },
      +    "seconds": {
      +      "type": "integer"
      +    },
      +    "started_at": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "timeout_s": {
      +      "type": "integer"
      +    },
      +    "viewport": {
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / session_id / description
      Added value: +"The browser session's id, as the opened browser returned it."
  3. Added

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, and the description goes beyond them with real operational facts: charging is settled at close, an idle session keeps billing until timeout, and downloaded files persist for 10 minutes. Those are genuinely useful disclosures an agent cannot get from annotations or schema. The closing sentence 'A repeat call answers the same' sits in mild tension with idempotentHint=false — it implies retries are harmless — which muddies rather than clarifies retry behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the action and effect, then billing, file retention, and repeat-call behavior — no filler. The only weak sentence is the ambiguous 'A repeat call answers the same.'

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 the safety profile and an output schema covering the response, the description needs only to explain side effects, and it does: billing settlement, timeout charging, and a 10-minute file window. Completeness is good for a one-parameter lifecycle tool; only retry semantics remain genuinely unclear.

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?

There is a single required parameter with 100% schema description coverage, and the schema itself explains that the id must be the one the opened browser returned. The description adds no meaning beyond that, so the baseline 3 for a fully documented schema applies.

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 and resource ('Closes a browser session') and adds the scope of the effect (charge settles for seconds and steps), so it is clearly distinct from open_browser and get_browser. It stops short of explicitly contrasting itself with any sibling, which keeps it from a 5.

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?

It gives an explicit trigger — 'Call it when the task is done' — plus the consequence of not doing so: 'an open session is charged until it times out.' That is strong when-to-use guidance. There is no stated when-not-to case or named alternative, but close_browser has no obvious substitute among the siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.