Skip to main content
Glama

Robot Actions — Remote Device Control

iOS Safari close tab

ios_safari_close_tab
Idempotent

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.8/5.0
Behavior5/5

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

Annotations already declare the safety profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), yet the description adds substantial context beyond them: that this sees MORE tabs than ios_safari_list_pages, that titles match case-insensitively on any part of the title, and that Safari must be foregrounded with an active session. This is rich behavior disclosure that the structured fields do not carry.

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?

Four sentences, all substantive and front-loaded with the primary action followed by the listing mode and caveats. It is dense but every sentence earns its place; slightly wordier than strictly necessary for the alternative-protocol rationale.

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?

For a mutation tool with no output schema and full param coverage, the description supplies the operational requirements (foreground Safari, active automation session), the matching semantics, and the relationship to the sibling list-pages tool. Nothing needed to call it 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%, so baseline is 3, but the description adds meaning beyond the schema by specifying 'Titles match case-insensitively on any part of the title' and describing the list-vs-close behavior of an omitted title. It does not restate the 'all' flag semantics, which remain in the schema.

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 Safari tabs on an iOS device') and immediately distinguishes the listing mode ('list what is open'). It also names the sibling ios_safari_list_pages and explains the boundary between them, so the agent can identify the right tool without opening schemas.

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?

Explicit when-to-use: 'Call with no title to list the open tabs and close nothing.' It further explains why native UI is required ('the Web Inspector protocol behind ios_safari_list_pages cannot do it') and states the preconditions (Safari in foreground, active automation session), leaving nothing to inference.

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