Skip to main content
Glama

safari_query_all

Finds all elements matching a CSS selector and returns each match's tag, text, href, and value so agents can inspect page content or locate targets for later interaction.

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

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "safari_query_all"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default: 20)
receiptNoOmit it: Daylight has no tab receipts and refuses a call that passes one
selectorYesCSS selector

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it delivers: it discloses the shape of what comes back (tag, text, href, value, absent an output schema) and warns that x/y are relative to each element's own frame viewport, a non-obvious trap that would otherwise cause mis-clicks. It does not state whether hidden elements are included or whether the call waits for matches to appear.

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, zero filler. The core capability comes first, and the iframe/coordinate caveat follows as the necessary operational warning.

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 simple selector query with no output schema, the definition covers what is needed: what is returned and the key coordinate pitfall. The remaining gaps (visibility filtering, waiting behavior) are minor for this tool's complexity.

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 selector, limit, and receipt parameters are already documented in the schema. The description adds nothing about parameter behavior — the x/y it discusses are returned fields, not inputs — so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'Find all elements matching a CSS selector', and names the returned fields (tag, text, href, value). It does not explicitly contrast itself with siblings like safari_evaluate or safari_click_and_read, so differentiation is only implicit.

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?

There is conditional guidance buried in the second sentence — for matches inside an iframe, use a selector or snapshot ref rather than returned coordinates — but no statement of when to prefer this query over the sibling extraction/evaluate tools. Usage is implied rather than spelled out.

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