Skip to main content
Glama

safari_close_tab

DestructiveIdempotent

Closes a Safari tab specified by window ID and one-based tab index, requiring human approval before the action runs.

Instructions

Close a tab identified by window ID and one-based tab index. Prompts for human approval. [v1.0.0; permissions: automation:Safari]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIndexYes
windowIdYes
_approvalIdNoID of the exact action approved by a human in the macOS Agent Bridge extension
_idempotencyKeyYesClient-generated unique key, required for writes; reuse only with identical arguments, including while waiting for approval

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
toolYestool name
errorYes
statusYes
versionYessemantic version

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and openWorldHint=true, so the safety profile is covered. The description adds a genuinely non-redundant behavioral fact — that a human approval prompt gates execution — plus the required automation:Safari permission scope. It stops short of describing failure behavior for an invalid tab or the idempotency semantics declared in annotations.

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?

Two short sentences: the action and its identifiers come first, then the approval gate and the version/permission metadata. Every element is relevant, though the bracketed metadata block is slightly mechanical and could be trimmed without loss.

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?

With an output schema present, return values need no explanation, and annotations carry the safety profile; the critical extra fact (human approval) is stated. The remaining gap is operational: how to discover valid window/tab identifiers and what happens on a stale or out-of-range index.

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 only 50%: windowId and tabIndex have empty schema descriptions, while _approvalId and _idempotencyKey are documented in the schema. The description compensates for the gap by clarifying that tabIndex is one-based and that the pair (window ID, tab index) is the identifier, which adds real meaning beyond the bare integer minimums.

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 (close a tab) plus the exact identification scheme (window ID + one-based tab index), which cleanly separates it from siblings like safari_open_tab and safari_list_tabs. An agent can decide to use this tool 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the purpose (this is the only close-tab tool among the siblings), and the approval requirement signals it is a deliberate, gated action. However, it never says how to obtain a valid windowId/tabIndex (e.g. via safari_list_tabs) or what to do when the tab does not exist, so no explicit when/when-not guidance is given.

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