Skip to main content
Glama
safari-mcp
by tszaks

safari_query_elements

Query DOM elements on the current Safari page by CSS selector, with optional result limits and tab or window targeting for browser automation.

Instructions

Query DOM elements in the current Safari page.

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_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
selectorYes
tab_indexNo
window_indexNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

C2.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden and largely drops it. It does not state whether the operation is read-only, what the result shape is, whether returned elements can be fed into safari_click_element or safari_type_into_element, or how tab_index/window_index change the target page.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no wasted words, but its brevity comes from omission rather than efficiency. It reads as an adequate one-line summary that stops well short of what the tool needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a browser DOM-inspection tool with no annotations, no output schema, and zero parameter documentation, so the description is the only source of behavioral detail — and it provides one sentence. Key facts an agent needs before calling it (return format, selector language, tab targeting, default limit) are all absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across four parameters (selector, limit, tab_index, window_index), and the description mentions none of them. It does not explain selector syntax (CSS? XPath?), what limit bounds, or whether tab_index/window_index default to the active tab.

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

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a verb ("Query") and a resource ("DOM elements") scoped to "the current Safari page," which is clearer than a bare name restatement. However, "query" is ambiguous about what is actually returned (element handles? matches? a list?), and nothing distinguishes it from siblings such as safari_get_page_html, safari_snapshot_page, or safari_find_in_page that also read the DOM.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no exclusion conditions, and no named alternative. An agent cannot tell from this sentence whether to reach for this tool or safari_find_in_page / safari_get_page_html when it needs element information.

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