Skip to main content
Glama

tabs_close_mcp

Close a single session tab by its id to tidy up a page that has served its purpose. Requires a valid id from tabs_context_mcp; closing the last tab blanks it instead.

Instructions

Shut one tab out of the session tab group, addressed by id - the way you tidy up once a page has served its purpose. tabId is required, and has to be an id tabs_context_mcp reported: a tab from one of your own windows, or one that is already gone, is refused rather than quietly ignored. Ids are handed out in sequence and never reused, so a closed one stays invalid for the rest of the session. Shutting the last remaining tab empties the group; a later tabs_context_mcp that passes createIfEmpty, or any tabs_create_mcp, builds a fresh one. Firefox never closes its own final tab, so that one is blanked to about:blank instead and reused for the next tab you ask for.

Input Schema

NameRequiredDescriptionDefault
tabIdYesId of the tab to close, an integer taken from tabs_context_mcp. It has to be one of the tabs this session opened for itself.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses input validation (ids not reported by tabs_context_mcp, or from the agent's own windows, are refused rather than ignored), id lifecycle (sequential, never reused, closed ids stay invalid), and the last-tab edge case (group empties; Firefox blanks the final tab to about:blank and reuses it).

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?

The core action and its required parameter are front-loaded in the first clause, and every subsequent sentence covers a distinct edge case rather than restating. It is dense and slightly long for a one-parameter tool, but nothing is filler.

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?

No annotations and no output schema, so the description must cover behavior alone — and it does, including validation rules, id reuse semantics, empty-group consequences, and the Firefox final-tab exception. Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already defines tabId's origin, so baseline is 3. The description adds lifecycle meaning the schema lacks: ids are handed out in sequence, never reused, and a closed id remains invalid for the rest of the session.

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 and resource ('Shut one tab out of the session tab group, addressed by id') and pins the scope to tabs this session owns. An agent can distinguish it from tabs_create_mcp and tabs_context_mcp without opening any 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?

Frames the usage context ('the way you tidy up once a page has served its purpose') and routes the agent to alternatives when the group empties: a later tabs_context_mcp with createIfEmpty, or tabs_create_mcp. It does not spell out an explicit when-not-to-use case, so it falls short of full conditional guidance.

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