Skip to main content
Glama

Robot Actions — Remote Device Control

ios_safari_close_tab

Close Safari tabs on an iOS device by title, or list what is open. Safari's tab overview is the only way to close a tab — the Web Inspector protocol behind ios_safari_list_pages cannot do it — so this drives the native UI. Call with no title to list the open tabs and close nothing. Titles match case-insensitively on any part of the title. Note this sees MORE tabs than ios_safari_list_pages, which only reports pages that are loaded and inspectable. Requires Safari in the foreground and an active iOS automation session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoClose every tab matching `title` instead of only the first. Default false.
udidYesiOS device UDID
titleNoClose tabs whose title contains this text. Omit to just list the open tabs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses that the tool drives native UI, explains the limitation of Web Inspector, and reveals that it sees more tabs than ios_safari_list_pages. It also covers matching behavior (case-insensitive, partial) and the no-title listing behavior. It doesn't mention side effects or output format, but the core behavioral traits are well documented.

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 five sentences with no filler. The main purpose is front-loaded, followed by a necessary technical context, usage nuance, and prerequisites. Every sentence contributes new information, and the structure makes the tool's behavior easy to parse.

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?

The description is thorough for a tool with this complexity: it covers the core action, list-vs-close behavior, matching semantics, comparison with sibling tools, and environmental prerequisites. The only notable gap is the absence of return value or output details, but with no output schema defined, this is a minor omission rather than a critical flaw.

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 description coverage is 100%, so baseline is 3. The description adds significant semantic value beyond the schema: it clarifies that omitting `title` triggers a list-only mode, specifies case-insensitive partial matching, and implicitly explains that `all` affects how many matching tabs are closed. This elevates it above the baseline.

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 opens with a specific verb-resource pair: "Close Safari tabs on an iOS device by title, or list what is open." It explicitly differentiates from ios_safari_list_pages by noting that the Web Inspector protocol cannot close tabs, making the tool's scope unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description states exactly when to use this tool versus ios_safari_list_pages and provides the selection criterion: closing tabs requires native UI, while listing inspectable pages goes through Web Inspector. It also gives concrete usage instructions: call with no title to list, and notes prerequisites (Safari foreground, active automation session).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources