Analyze — Active Analysis
The analyze tool triggers active analysis — DOM queries, accessibility audits, security scans, link health checks, and visual annotations. Unlike observe (which reads passive buffers), analyze dispatches work to the browser extension and returns results.
Need one runnable call + response shape + failure fix for every mode? See Analyze Executable Examples.
Quick Reference
Section titled “Quick Reference”analyze({what: "dom", selector: ".error-banner"}) // Query live DOManalyze({what: "accessibility", scope: "#main", tags: ["wcag2a"]}) // WCAG auditanalyze({what: "security_audit", checks: ["credentials", "pii"]}) // Security scananalyze({what: "link_health", domain: "example.com"}) // Check all linksanalyze({what: "performance"}) // Performance snapshotanalyze({what: "error_clusters"}) // Group similar errorsanalyze({what: "page_summary"}) // Page structureanalyze({what: "annotations", annot_session: "review"}) // Draw mode resultsCommon Parameters
Section titled “Common Parameters”These parameters work across multiple modes:
| Parameter | Type | Description |
|---|---|---|
what | string (required) | Which mode to use (see sections below) |
sync | boolean | Wait for result (default: true) |
background | boolean | Return immediately with a correlation_id |
telemetry_mode | string | Telemetry metadata: off, auto, or full |
tab_id | number | Target a specific tab (omit for active tab) |
DOM Queries
Section titled “DOM Queries”Query the live DOM using CSS selectors. Returns element details: tag, attributes, text content, visibility, and children.
analyze({what: "dom", selector: ".error-banner"})analyze({what: "dom", selector: "nav a", tab_id: 123})analyze({what: "dom", selector: "[role='alert']", frame: "#app-iframe"})| Parameter | Type | Description |
|---|---|---|
selector | string | CSS selector to query |
frame | string/number | Target iframe: CSS selector, 0-based index, or "all" |
tab_id | number | Target specific tab (omit for active tab) |
Performance
Section titled “Performance”performance
Section titled “performance”Performance snapshots with before/after comparison and regression detection.
analyze({what: "performance"})Accessibility
Section titled “Accessibility”accessibility
Section titled “accessibility”WCAG accessibility audit using axe-core. Returns violations, passes, and incomplete checks.
analyze({what: "accessibility"})analyze({what: "accessibility", scope: "#main-content", tags: ["wcag2a"]})| Parameter | Type | Description |
|---|---|---|
scope | string | CSS selector to limit the audit scope |
tags | array | WCAG tags to test (e.g., wcag2a, wcag2aa, best-practice) |
force_refresh | boolean | Bypass cached results |
frame | string/number | Target iframe |
Error Analysis
Section titled “Error Analysis”error_clusters
Section titled “error_clusters”Groups similar errors together by message pattern. Useful for identifying the most common error categories.
analyze({what: "error_clusters"})Navigation
Section titled “Navigation”history
Section titled “history”Recent navigation history for the current tab.
analyze({what: "history"})navigation_patterns
Section titled “navigation_patterns”Analyze user navigation flow patterns from captured activity (common entry routes, transitions, and repeated paths).
analyze({what: "navigation_patterns"})Security
Section titled “Security”security_audit
Section titled “security_audit”Scans captured data for security issues: leaked credentials, PII exposure, insecure headers, cookie misconfiguration, transport security, and auth problems.
analyze({what: "security_audit"})analyze({what: "security_audit", checks: ["credentials", "pii"], severity_min: "high"})| Parameter | Type | Description |
|---|---|---|
checks | array | Which checks to run: credentials, pii, headers, cookies, transport, auth |
severity_min | string | Minimum severity: critical, high, medium, low, info |
third_party_audit
Section titled “third_party_audit”Analyzes third-party scripts and external dependencies loaded by the page.
analyze({what: "third_party_audit"})analyze({what: "third_party_audit", first_party_origins: ["https://myapp.com"]})| Parameter | Type | Description |
|---|---|---|
first_party_origins | array | Origins to consider first-party |
include_static | boolean | Include origins that only serve static assets |
custom_lists | object | Custom allowed/blocked/internal domain lists |
Link Health
Section titled “Link Health”link_health
Section titled “link_health”Browser-based link checker. Navigates links in the extension to detect broken links, CORS issues, and redirect chains. Runs concurrently with configurable worker count.
analyze({what: "link_health", domain: "example.com"})analyze({what: "link_health", domain: "example.com", max_workers: 5, timeout_ms: 10000})| Parameter | Type | Description |
|---|---|---|
domain | string | Domain to check links for |
max_workers | number | Max concurrent workers |
timeout_ms | number | Timeout per link check |
link_validation
Section titled “link_validation”Server-side URL validation with SSRF-safe transport. Validates specific URLs from the MCP server without needing the browser extension.
analyze({what: "link_validation", urls: ["https://example.com/page1", "https://example.com/page2"]})| Parameter | Type | Description |
|---|---|---|
urls | array | URLs to validate |
Page Analysis
Section titled “Page Analysis”page_summary
Section titled “page_summary”Page structure summary — headings, landmarks, forms, links, and metadata.
analyze({what: "page_summary"})analyze({what: "page_summary", timeout_ms: 10000, world: "main"})| Parameter | Type | Description |
|---|---|---|
timeout_ms | number | Timeout for page analysis |
world | string | Execution world: auto, main, isolated |
tab_id | number | Target specific tab |
api_validation
Section titled “api_validation”Infer API schemas from captured traffic and validate consistency. Detects response shape changes, missing fields, and type mismatches.
analyze({what: "api_validation", operation: "analyze"})analyze({what: "api_validation", operation: "report"})analyze({what: "api_validation", operation: "clear"})| Parameter | Type | Description |
|---|---|---|
operation | string | analyze (infer schemas), report (show results), clear (reset) |
ignore_endpoints | array | URL substrings to exclude from analysis |
Draw Mode & Annotations
Section titled “Draw Mode & Annotations”annotations
Section titled “annotations”Retrieve annotations from the last draw mode session. Users draw rectangles and type feedback, then press ESC. This mode returns all annotations.
analyze({what: "annotations"})analyze({what: "annotations", session: "checkout-review"})analyze({what: "annotations", session: "checkout-review", wait: true, timeout_ms: 300000})| Parameter | Type | Description |
|---|---|---|
session | string | Named session for multi-page annotation review |
wait | boolean | Block until user finishes drawing (default 5 min timeout) |
timeout_ms | number | Max wait time when wait: true (max 600000ms / 10 min) |
annotation_detail
Section titled “annotation_detail”Full computed styles and DOM detail for a specific annotation. Use after retrieving annotations to get detailed style information for a specific element.
analyze({what: "annotation_detail", correlation_id: "ann-abc123"})| Parameter | Type | Description |
|---|---|---|
correlation_id | string | Annotation correlation ID from annotations results |
draw_history
Section titled “draw_history”List all past draw mode sessions with metadata.
analyze({what: "draw_history"})draw_session
Section titled “draw_session”Get the full data for a specific draw session.
analyze({what: "draw_session", file: "session-2026-02-17.json"})| Parameter | Type | Description |
|---|---|---|
file | string | Session filename from draw_history results |
CSS & Forms
Section titled “CSS & Forms”computed_styles
Section titled “computed_styles”Get computed CSS styles for a specific element. Useful for debugging visual issues.
analyze({what: "computed_styles", selector: ".error-banner"})| Parameter | Type | Description |
|---|---|---|
selector | string | CSS selector for the target element |
Analyze form elements on the page — field types, validation state, labels, required fields.
analyze({what: "forms"})analyze({what: "forms", selector: "#checkout-form"})| Parameter | Type | Description |
|---|---|---|
selector | string | CSS selector to scope the analysis |
form_state
Section titled “form_state”Capture current form values, touched/dirty state, and validation metadata for debugging complex form behavior.
analyze({what: "form_state"})analyze({what: "form_state", selector: "#checkout-form"})| Parameter | Type | Description |
|---|---|---|
selector | string | CSS selector to scope form-state extraction |
form_validation
Section titled “form_validation”Validate form configuration — checks for missing labels, incorrect input types, accessibility issues in form structure.
analyze({what: "form_validation"})analyze({what: "form_validation", summary: true})| Parameter | Type | Description |
|---|---|---|
summary | boolean | Return compact summary |
data_table
Section titled “data_table”Extract structured data-table snapshots (headers, rows, and cell mappings) for dashboard and reporting UIs.
analyze({what: "data_table"})analyze({what: "data_table", selector: "#orders", max_rows: 100, max_cols: 20})| Parameter | Type | Description |
|---|---|---|
selector | string | CSS selector for a specific table |
max_rows | number | Maximum rows to return |
max_cols | number | Maximum columns to return |
Visual Regression
Section titled “Visual Regression”visual_baseline
Section titled “visual_baseline”Save a named visual baseline snapshot of the current page. Used as the reference for later visual_diff comparisons.
analyze({what: "visual_baseline", name: "homepage-v1"})| Parameter | Type | Description |
|---|---|---|
name | string (required) | Name for this baseline |
visual_diff
Section titled “visual_diff”Compare the current page state against a saved visual baseline. Returns pixel differences with configurable threshold.
analyze({what: "visual_diff", baseline: "homepage-v1"})analyze({what: "visual_diff", baseline: "homepage-v1", threshold: 50})| Parameter | Type | Default | Description |
|---|---|---|---|
baseline | string (required) | — | Baseline name to compare against |
threshold | number | 30 | Pixel diff threshold 0-255 |
visual_baselines
Section titled “visual_baselines”List all saved visual baselines.
analyze({what: "visual_baselines"})Page Structure
Section titled “Page Structure”navigation
Section titled “navigation”Analyze navigation structure — menu items, links, breadcrumbs, and routing patterns.
analyze({what: "navigation"})page_structure
Section titled “page_structure”Deep structural analysis of the page — heading hierarchy, landmark regions, content sections, semantic HTML usage.
analyze({what: "page_structure"})Combined Audit
Section titled “Combined Audit”Run a multi-category audit in a single call. Combines performance, accessibility, security, and best practices checks.
analyze({what: "audit"})analyze({what: "audit", categories: ["accessibility", "security"], summary: true})| Parameter | Type | Description |
|---|---|---|
categories | array | Which audits to run: performance, accessibility, security, best_practices |
summary | boolean | Return compact summary |
feature_gates
Section titled “feature_gates”Detect feature flags and feature gates on the page — A/B test variants, feature toggles, and experiment assignments visible in the DOM or JavaScript globals.
analyze({what: "feature_gates"})