Skip to main content
Glama

close_page

Destructive

Closes a browser tab by index and returns the remaining tabs. If the active tab is closed, switches to the last remaining one; fails if only tab or index invalid.

Instructions

Close the tab at this index (see tabs). If it was the tab being driven, jevnav drives the last remaining one; closing the only tab, or an out-of-range index, is an error. Returns the tabs that remain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructive, non-idempotent, open-world behavior, and the description adds real edge-case context beyond them: the fallback when the driven tab is closed (drive the last remaining one) and the two explicit error conditions. That is exactly the kind of post-condition detail annotations cannot convey.

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?

Three sentences, front-loaded with the core action and then the edge cases; every clause carries information. The awkward line-wrapping/indentation slightly hurts readability but nothing is wasted.

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 destructive mutation tool it covers the mutation result, the fallback behavior, and error cases; an output schema exists so return-value explanation is not strictly required (though it restates it). The one remaining gap is index-base/range semantics, which neither schema nor description pins down.

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 coverage is 0% and the single 'index' parameter is undocumented in the schema, so the description must carry it. It clarifies that the index refers to a tab index from the 'tabs' tool, but leaves 0-based vs 1-based indexing and valid range unspecified, so the compensation is partial.

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?

States a specific verb ('Close') and resource ('the tab at this index'), and points the agent at the sibling 'tabs' tool for resolving the index. An agent can distinguish this from siblings like new_page, select_page, and tabs without opening the schema.

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?

Explains the boundary conditions under which the tool fails (closing the only tab, out-of-range index) and what happens to the driven tab, plus a pointer to 'tabs' for the index. It stops short of explicitly contrasting with alternatives, but the driving/selection context is clearly implied.

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