Skip to main content
Glama

browser_closeTab

Close a browser tab by target ID, or the active tab when none is specified. Cannot close the last remaining tab; use browser_restart instead.

Instructions

Close a browser tab by targetId. If no targetId provided, closes the active tab. Cannot close the last remaining tab — use browser_restart instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetIdNoTarget tab ID to close (optional, defaults to active tab)
Behavior4/5

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

With no annotations provided, the description must carry the behavioral burden. It discloses the default behavior, the limitation on closing the last tab, and the suggested alternative. Could be slightly richer (e.g., what happens to page state), but it is largely transparent for a simple close action.

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 deliver the core action, default, and a key exception. Every word earns its place; no redundancy or fluff.

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?

The tool is simple with one optional parameter and no output schema. The description covers the action, default, and edge case, and provides an alternative for the one forbidden scenario. It is fully self-contained for the given complexity.

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 schema already provides 100% coverage for the single parameter, including the optional default behavior. The description adds no new parameter-specific meaning beyond what the schema states, so the baseline of 3 is appropriate.

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 clearly states the action ('Close a browser tab'), the target ('by targetId'), and the default behavior when no ID is given. It distinguishes itself from sibling tools like browser_restart and browser_newTab by specifying exactly what it does.

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?

Explicitly explains the default behavior (closes active tab if no targetId) and provides an exclusion: cannot close the last tab, directing the user to 'browser_restart' as an alternative. This is precise when-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/krshforever/bwb-browser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server