Skip to main content
Glama

关闭标签页

web_tab_close

Close a browser tab (defaults to active) and switch to the first remaining tab. Optionally specify a tab id; unsaved form data may be lost.

Instructions

关闭标签页(默认关闭当前活动标签页)。关闭当前页后自动切换到剩余的第一个标签页。

权限说明:关闭浏览器标签页,未保存的表单数据将丢失。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo要关闭的标签页 id,省略则关闭当前页
Behavior4/5

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

With no annotations provided, the description carries the burden and does well: it discloses two key behaviors—defaulting to the current tab and auto-switching to the first remaining tab after closing. It also warns that unsaved form data will be lost, which is valuable for a destructive 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?

The description is very concise, with two sentences, and front-loaded with the core function. The default behavior and the post-close switching action are stated efficiently, and the permission note adds important context without verbosity.

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 simple one-parameter closing tool with no output schema, the description covers the essential contexts: default behavior, what happens after closing, and a data-loss warning. It lacks only edge-case details like behavior when closing the last tab or handling invalid IDs, but these are not critical for basic use.

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 input schema already has 100% coverage, describing the optional 'id' parameter and noting that omission closes the current page. The description reinforces this by mentioning the default current tab, but adds no additional parameter-specific semantics beyond what the schema provides.

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 tool's purpose: to close browser tabs, with the default being the current active tab. This distinguishes it from sibling tools like web_tab_switch, web_tab_new, and web_tab_list by defining a distinct close action.

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?

The description implies usage when a tab needs to be closed and clarifies the default behavior, but it does not explicitly compare with alternatives or state when not to use this tool. There is no mention of using web_tab_switch for merely switching tabs, so alternatives are not addressed.

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/JohnXu22786/browser-automation'

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