Skip to main content
Glama

trace_path

Trace the screen-reader navigation path to any interactive target. Returns step-by-step actions and cumulative cost to explain poor accessibility scores.

Instructions

Trace the exact screen-reader navigation path to a specific interactive target. Returns step-by-step actions a screen-reader user would perform, with modeled announcements, cumulative cost, and the target's role/name at each hop. Read-only — navigates to the URL but does not modify the page.

Use this after analyze_url to understand why a target scored poorly.

For auth-gated or explored targets: Pass statesJson from a prior analyze_url (use includeStates=true). This skips browser launch entirely and traces against the captured state, including any explored states discovered behind auth boundaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the page to trace
targetYesTarget to trace to. Exact target ID or glob pattern (e.g., '*search*', 'Submit*'). Case-insensitive.
profileNoAT profile IDgeneric-mobile-web-sr-v0
deviceNoPlaywright device name for emulation (e.g., 'iPhone 14')
waitForSelectorNoCSS selector to wait for before capturing (essential for SPAs)
exploreNoExplore hidden branches (menus, tabs, dialogs) before tracing
timeoutNoPage load timeout in milliseconds
statesJsonNoPre-captured states from a prior analyze_url (use includeStates=true). When provided, trace_path skips browser launch.
storageStateNoPath to Playwright storageState JSON for authenticated pages. Must be within cwd.
Behavior4/5

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

Explicitly states it is read-only and does not modify the page. Also describes behavior when statesJson is provided (skips browser launch). No annotations exist, so description carries full burden and does well.

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 concise paragraphs. First paragraph delivers the core purpose and output format. Second paragraph provides essential usage tips. No wasted words, front-loaded with action.

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?

Given no output schema, the description explains the return format (step-by-step actions, announcements, cost, target role/name). Provides enough context for a complex tool with 9 parameters. Could mention error handling but sufficient.

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. Description adds value for key parameters: explains target accepts glob patterns and is case-insensitive, statesJson usage, and storageState path. Adds context beyond 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?

The description clearly states the tool traces the screen-reader navigation path to a specific target, returning step-by-step actions. It distinguishes itself from sibling tools by specifying it is used after analyze_url to understand poor scores.

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

Usage Guidelines4/5

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

Explicitly says to use this after analyze_url, and provides guidance for auth-gated targets using statesJson. While not exhaustive on when not to use, it gives clear context for appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tactual-dev/tactual'

If you have feedback or need assistance with the MCP directory API, please join our Discord server