Skip to main content
Glama

import_agent_trace

Convert a page-agent action trace into a deterministic, replayable PageBolt sequence for consistent browser automation. Resolve element indices to CSS selectors using an observe_page flatdomtree map.

Instructions

Convert a page-agent/browser-use action trace into a re-runnable PageBolt sequence. Give it the array of actions a page-agent produced (each entry may be either {action, index|selector, value, ...} or the {action_name: {...}} shape) plus, optionally, the selectors map from observe_page with format:"flatdomtree" to resolve indices to CSS selectors. Set save:false for a dry run that returns the translated steps without persisting. This endpoint does NOT consume request quota. Pair with observe_page (format:"flatdomtree") → run an agent → import_agent_trace to turn an ad-hoc agent run into a deterministic, replayable sequence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional name for the resulting sequence.
saveNoWhether to persist the sequence (default true). Set false for a dry run that returns the translated steps + step_count without saving.
typeNoOptional target type for the imported steps: "sequence" (default) or "video".
traceYesRequired. Array of page-agent/browser-use action entries. Supports both {action, index|selector, value, ...} and {action_name: {...}} shapes.
selectorsNoOptional index→CSS selector map (e.g. from observe_page format:"flatdomtree"). Used to resolve numeric element indices in the trace to concrete selectors.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.17.0

TDQS

A4.3/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 does well: it discloses that the endpoint 'does NOT consume request quota', that save:false returns translated steps without persisting, and what the dry run returns. It stops short of documenting error/failure behavior or auth requirements, so it is strong but not exhaustive.

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?

Verb+resource is front-loaded, and each subsequent sentence adds a distinct fact (trace shape, selectors option, dry-run flag, quota note, workflow pairing). It is dense but nearly every clause earns its place; slightly long but not 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?

For a complex tool with five parameters, a nested trace object, and no output schema, the description covers the trace input, selectors resolution, persistence control, and side-effect profile well. It leaves the exact return payload shape somewhat implicit, which keeps it from a 5.

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 schema already documents every parameter. The description largely restates the trace entry shapes and the selectors map origin that the schema already provides, adding only marginal framing. Baseline 3 is appropriate.

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 opening sentence names a specific verb and both resources: 'Convert a page-agent/browser-use action trace into a re-runnable PageBolt sequence.' This is unambiguous and clearly distinct from siblings like observe_page, run_sequence, and export_sequence.

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

Usage Guidelines5/5

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

It prescribes the exact workflow 'observe_page (format:"flatdomtree") → run an agent → import_agent_trace', explains the dry-run condition (save:false), and describes the intended outcome (turn an ad-hoc agent run into a deterministic, replayable sequence). An agent knows when and why to reach for this tool.

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