Skip to main content
Glama

page_close

Closes the active browser tab and automatically activates the next tab, streamlining tab management.

Instructions

Close the current tab; the next tab becomes active.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
leaseNoOptional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env.
sessionNoOptional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the key side effect (next tab becomes active), which is helpful, but does not mention that closing is irreversible, what happens if only one tab exists, or whether the action is destructive. It also doesn't clarify that it operates within the context of a specified session.

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 a single, focused sentence that states the action and its immediate effect with no wasted words. It is efficiently structured and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is minimal and adequate for a simple close operation, but it omits edge cases (e.g., closing the last tab), the return value, and the relationship to the session parameter. Given the large set of sibling tools and the optional session parameter, the description could be more explicit about scope, making it moderately complete.

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 documents both parameters (lease and session) with detailed descriptions and 100% coverage. The description adds no additional parameter semantics, so the baseline of 3 applies.

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 states a specific action ('close') on a specific resource ('the current tab'), and notes the immediate consequence (next tab becomes active). This clearly distinguishes it from siblings like page_new (create tab) and page_switch (switch active tab).

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 when to use it (when you want to close a tab) but provides no explicit guidance on when not to use it or which alternative tools (e.g., session_close for closing an entire session, page_switch for changing active tab) to prefer. It lacks exclusions or comparative context.

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