Skip to main content
Glama

safari_query_all

Finds all elements matching a CSS selector in Safari, returning tag, text, href, and value for each match. Use it to inspect page content and target elements reliably.

Instructions

Find all elements matching a CSS selector (returns tag, text, href, value). x/y are relative to each element's own frame viewport — for matches inside an iframe, click by selector or snapshot ref, not by these coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default: 20)
receiptNoTab receipt from safari_new_tab — pins this call to that tab (survives reconnects/subagents)
selectorYesCSS selector

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.18.1
    • addedInput schema / properties / receipt
      Added value: +{
      +  "description": "Tab receipt from safari_new_tab — pins this call to that tab (survives reconnects/subagents)",
      +  "type": "string"
      +}
  2. Addedv2.11.6
  3. Removedv2.11.3
  4. Addedv2.10.9
  5. Removedv2.10.8
  6. Addedv2.10.5
  7. Removedv2.10.4
  8. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that this is a read-style query ('Find all elements'), what fields are returned, and an important coordinate relativity caveat for elements inside iframes. It does not mention error behavior or whether hidden elements are included, but the core behavioral surface is well covered.

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?

Two sentences with no filler. The first sentence front-loads the purpose and return fields, and the second delivers a high-value caveat about iframes and coordinates. Every clause earns its place.

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?

For a query tool with no output schema, the description provides the essential return fields and a non-obvious coordinate caveat, which an agent needs to correctly interpret results. It is complete enough for selecting and invoking the tool, though it could arguably add one line about how limit affects 'all' results. The absence of annotations is mitigated by the clear read-only framing.

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?

Schema description coverage is 100%, so the schema already documents selector, limit, and receipt. The description adds no parameter-specific meaning beyond confirming selector-driven behavior; the x/y mention refers to returned coordinates, not an input parameter. This meets the baseline but does not go beyond it.

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 opening phrase 'Find all elements matching a CSS selector' names a specific verb and resource, and the parenthetical '(returns tag, text, href, value)' makes the output scope concrete. The word 'all' and the selector-based approach clearly separate it from singular/action-oriented siblings like safari_get_element, safari_snapshot, or safari_click.

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 gives a clear functional context for querying elements, and the iframe coordinate caveat is genuinely useful guidance. However, it never explicitly says when to prefer this tool over alternatives such as safari_get_element or safari_snapshot, nor does it state exclusion criteria. The usage guidance is implied rather than explicit.

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

Deploy Server

Other Tools