Skip to main content
Glama

trace_prototype_flow

Trace Figma prototype navigation from a start screen through NAVIGATE, OVERLAY, and SWAP actions, returning reachable screens, edges, unresolved links, and pending screens.

Instructions

Trace a prototype flow (Figma Design only). Breadth-first search from a start screen (or a node inside one) following NAVIGATE / OVERLAY / SWAP actions, including ones nested in conditionals and on instance sublayers. Returns screens [{id, name, page, depth, reachedFrom}], edges [{from screen, sourceNode, trigger, action, navigation, destination, to screen, transition, conditional/conditions, followed:false for SCROLL_TO/CHANGE_TO}] plus BACK/CLOSE/URL edges, unresolved destinations (deleted nodes), and pending screens discovered but not visited because maxScreens was reached.

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": {
      "nodeId": "<nodeId>"
    },
    "name": "trace_prototype_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
nodeIdYesStart screen (top-level frame) or any node inside it
maxScreensNoMax screens to visit (default 25)
maxNodesPerScreenNoMax nodes scanned per screen (default 2000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does so well: it discloses that traversal follows NAVIGATE/OVERLAY/SWAP including nested conditionals and instance sublayers, that some actions are recorded but not followed (SCROLL_TO/CHANGE_TO), and that maxScreens truncation yields `pending` screens. It does not state read-only safety or permission/auth requirements, which keeps it short of a 5.

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?

Front-loads the verb and platform constraint, then a single dense but purposeful description of traversal and return shape. Every clause carries information; the bracket notation for return fields is compact rather than padded.

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?

With no output schema, the description must explain returns, and it does: screens, edges, back/close/URL edges, `unresolved` deleted nodes, and `pending` truncations. It omits practicalities like ordering of results or how to continue after truncation, leaving a small gap for a traversal tool with four parameters.

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 the baseline is 3; the description adds real meaning beyond the schema by explaining the consequence of maxScreens (screens remain `pending`, unvisited) and clarifying that nodeId may be a top-level frame or any node inside it. It adds little about file or maxNodesPerScreen beyond the 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?

States a specific verb+resource ("Trace a prototype flow") and scopes the platform (Figma Design only). It further distinguishes itself by describing the traversal method (breadth-first, following NAVIGATE / OVERLAY / SWAP actions), which separates it from siblings like get_prototype_connections.

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?

Gives implied usage: supply a start screen or any node inside one and the traversal begins there, with maxScreens bounding effort. However, it never says when to prefer this over get_prototype_connections or set_flow_starting_point, and offers no explicit when-not guidance.

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