Skip to main content
Glama

Trace the focus order

pour_focus_order

Audits a page's sequential keyboard focus order, listing every Tab-reachable control with role, name, CSS path, and positive tabindex values, plus native controls made unreachable by tabindex=-1.

Instructions

The sequential keyboard focus order of a page, as the Tab key visits it: every reachable control in order with its tag, role, accessible name (the engine's own computation) and CSS path. Controls with a positive tabindex come first and carry the value, since it forces their position. "unreachable" lists native controls a tabindex of -1 has taken out of the keyboard's reach. The same walk as the Focus Order lens in the pour extension. Results depend on the page state: the viewport width (responsive pages serve different content per breakpoint), whether the page was scrolled first (lazy content), and what is open on it. Say which you used when you report a figure.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pour_focus_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoThe page to load, http or https only. A local dev server is fine (http://localhost:8080/). Without a scheme, https is tried first, then http. For a file on disk use path instead: file:// URLs are refused.
pathNoA file on disk to check instead of a URL, relative to the folder the server was started in. It is served over http from its own folder, so relative assets load. Give one of url or path, not both.
rootNoWith path: the folder to serve as the site root, for a page whose assets are addressed from the root (/styles.css) rather than from its own folder. Defaults to the file's own folder.
scrollNoScroll through the page first so lazy-loaded content is in the DOM. Changes the numbers, by design. Default false.
waitMsNoExtra settle time after the page loads, in milliseconds. Default 0.
insecureNoIgnore TLS certificate errors, for a dev server with a self-signed certificate. Default false.
viewportNoViewport as WxH. Default 1440x900. Responsive pages serve different content per width, so the width is part of the result.
timeoutMsNoNavigation timeout in milliseconds. Default 30000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description does real work: it explains that positive tabindex values force ordering, that 'unreachable' means native controls removed from keyboard reach by tabindex=-1, and that results vary with viewport width, scroll state, and what is open on the page. That is substantive behavioral disclosure beyond the schema. It stops short of covering failure modes or the exact response envelope.

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?

The description is dense but front-loaded: what it returns, the tabindex caveat, the 'unreachable' definition, then the state-dependency warning. Most sentences carry information. The closing instruction to disclose which settings were used is a slight pivot away from describing the tool itself, keeping it below 5.

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?

Eight parameters, no annotations, and no output schema mean the description must carry the return shape itself, and it does name the per-control fields and the separate 'unreachable' collection. For a complex browser-driven tool this is close to sufficient, though the overall response structure (envelope, ordering guarantees, size limits) remains unstated.

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 every parameter already carries documentation and the baseline is 3. The description reinforces that viewport width and scroll 'change the numbers, by design,' adding causal framing, but it largely restates what the schema descriptions already say. No syntax or format detail is added beyond the structured fields.

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 precise verb-and-resource statement: 'The sequential keyboard focus order of a page, as the Tab key visits it,' then enumerates the per-control fields returned (tag, role, accessible name, CSS path). An agent can immediately tell this apart from pour_audit or pour_screenshot. It does not explicitly contrast itself with those siblings, which keeps it at 4 rather than 5.

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?

Usage is implied rather than stated: you would call this to inspect keyboard focus traversal and unreachable controls. The only explicit directive is 'Say which you used when you report a figure,' which is about reporting, not about when to choose this tool over pour_audit. There are no when-not conditions or named alternatives.

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