TruePx
v0.1.6Lets AI coding agents measure, inspect, edit and audit web pages in your Chrome through TruePx.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ping
Health check, forwarded to the extension. Replies with extension + bridge versions.
tabs_list
Tabs where TruePx is currently on. Returns { tabId, url, title } per tab; other tabs are invisible.
tab_focus
Bring a tab to the foreground so the user can watch edits happen.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_info
Page metadata: url, title, lang, description, OG tags, h1, viewport meta, page size, scroll, devicePixelRatio.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
selection_get
The element the user has locked in the TruePx overlay (id, tag, selector, classes, rect, computed subset, text). Starting point for "this element".
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
element_inspect
Uniform summary for one element: id, tag, selector, classes, rect, computed CSS subset, direct text.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewportId | number | Responsive mode only: viewport from viewport_state that should answer. Element ids are per-viewport — only pass ids that came from this viewport. |
elements_inspect
Batch element_inspect for up to 50 ids; unresolvable ids are reported separately.
| Parameter | Type | Description |
|---|---|---|
elementIds * | array | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewportId | number | Responsive mode only: viewport from viewport_state that should answer. Element ids are per-viewport — only pass ids that came from this viewport. |
dom_outline
Depth-limited subtree walk from an element (default body). Keeps layout exploration payloads small.
| Parameter | Type | Description |
|---|---|---|
elementId | string | Root element id; 'body' targets document.body. Omit for current selection. |
maxChildren | number | Max children per node (default 30). |
maxDepth | number | Max depth (default 8). |
tabId | number | Id of a tab where TruePx is on, from tabs_list. |
viewportId | number | Responsive mode only: viewport from viewport_state that should answer. Element ids are per-viewport — only pass ids that came from this viewport. |
dom_query
CSS selector search, up to 200 matches (id, tag, classes, rect, text, attrs). Optional rootId scopes the search.
| Parameter | Type | Description |
|---|---|---|
selector * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
limit | number | |
rootId | string | |
viewportId | number | Responsive mode only: viewport from viewport_state that should answer. Element ids are per-viewport — only pass ids that came from this viewport. |
css_matched_rules
Every CSS rule matching an element, highest specificity first, plus inline style text. Each rule carries a ruleHandle for css_set_inline.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewportId | number | Responsive mode only: viewport from viewport_state that should answer. Element ids are per-viewport — only pass ids that came from this viewport. |
edits_list
All tracked edits on the tab (CSS diffs with revert ids, class/HTML/text edits). Call first to review prior work.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
capture_screenshot
Viewport PNG with the TruePx highlight overlay (dock excluded), returned as an image block for vision models.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
css_set_inline
Merge declarations into a rule (ruleHandle) or an element's inline style (elementId). Empty value deletes a property; values may carry !important.
| Parameter | Type | Description |
|---|---|---|
styles * | object | CSS prop → value, e.g. { color: 'red' }. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
elementId | string | Required without ruleHandle; ignored with ruleHandle. |
ruleHandle | object | Rule handle from css_matched_rules or css_create_rule. Pass back exactly as received; hand-built refs are rejected. |
css_create_rule
Add a real cascade rule (no !important needed). Optional at-rule wrappers outermost-first, optional seed declarations. Returns a ruleHandle.
| Parameter | Type | Description |
|---|---|---|
selector * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
elementId | string | Inject into this element's shadow root instead of the document. |
styles | object | |
wrappers | array | At-rule strings, e.g. ["@media (min-width: 768px)"]. |
css_set_selector
Retarget a rule's selector. Returns a refreshed ruleHandle; nesting selectors are read-only.
| Parameter | Type | Description |
|---|---|---|
ruleHandle * | object | Rule handle from css_matched_rules or css_create_rule. Pass back exactly as received; hand-built refs are rejected. |
selector * | string | New selector text. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
edits_revert
Revert one tracked CSS change by its changeId (from an edit response or edits_list).
| Parameter | Type | Description |
|---|---|---|
changeId * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
edits_revert_all
Revert every tracked change on the tab (rules, inline styles, classes, HTML/text). Same coverage as the panel's revert-all.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
dom_set_text
Replace an element's text (drops HTML children). Undoable.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
text * | string | New plain text. |
dom_set_html
Replace inner HTML. Strips script/style/iframe/form/input/link/meta and inline handlers.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
html * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
dom_insert_html
Insert sanitized HTML relative to an element: before | after | prepend | append.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
html * | string | |
position * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
element_set_classes
Replace the full class list (space-separated; empty clears). Undoable.
| Parameter | Type | Description |
|---|---|---|
classes * | string | |
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
selection_set
Highlight an element in the TruePx overlay, scroll it into view, update the panel.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
dom_remove
Soft-delete (hidden, reported removed, restorable). Undoable.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
dom_duplicate
Clone after the original with a fresh id. Undoable.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_breakpoints
Declared @media breakpoints ascending; em/rem normalized against root font size.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
find_overflow
Elements pushing the page past the viewport (horizontal-scroll culprits), biggest overflow first with fix hints.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
fix_contrast
Nudge foreground colors in an element subtree until each text meets its WCAG AA requirement (4.5:1, or 3:1 for large text), measured by axe-core against the real background. target overrides it (e.g. 7 for AAA). Pass preview:true to suggest without applying.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
preview | boolean | |
target | number |
simulate_vision
Simulate color-vision deficiency page-wide so designs can be judged as affected users see them. Mode off disables.
| Parameter | Type | Description |
|---|---|---|
mode * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
mockup_overlay
Pin a design mockup over the live page to compare implementation vs design. set takes a data:image URL (+ optional file name; "@2x" in it picks @2x size); config adjusts opacity/blend/position/scale (fit = page width, 1x = actual pixels, 2x = half size for Retina exports; set picks 1x or 2x automatically); difference blend is an onion-skin diff.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
blend | string | |
dataUrl | string | |
name | string | |
opacity | number | |
scale | string | |
visible | boolean | |
x | number | |
y | number |
sweep_breakpoints
Load the page at probe widths in hidden frames and report where layout breaks or heals. Optional widths array (max 9, 200–3840). Slow — allow up to ~40s.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
widths | array |
find_inconsistencies
Scan the page for visual drift: button style clusters, heading variation, off-grid spacing, near-miss alignment.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
list_pins
Designer pins: id, selector, note, status, live rect. Work open pins top to bottom, then resolve each.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
add_pin
Drop a pin on an element with a note (for batch review comments).
| Parameter | Type | Description |
|---|---|---|
note * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
elementId | string | Element id from an earlier element tool. |
selector | string |
resolve_pin
Close a pin by id once acted on (resolved:false reopens).
| Parameter | Type | Description |
|---|---|---|
pinId * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
resolved | boolean |
font_forensics
Which font in the stack actually rendered, plus faux bold/italic detection.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
find_heavy_images
Images costing more than they show: oversized, unsized, eager below the fold, legacy formats.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
capture_states
Screenshots of one element in default/hover/focus/active states, returned as image blocks. Slow — allow ~30s.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewports_open
Wrap the page in resizable frames. Discards pending CSS edits — call edits_list first.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewports_close
Reload at natural viewport. Discards edits made inside responsive mode.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewport_update
Resize one viewport (200–3840 × 300–3840). Without viewportId resizes the first.
| Parameter | Type | Description |
|---|---|---|
height * | number | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
width * | number | |
viewportId | number |
viewport_state
Canvas state: viewports in on-screen order (id, size, name, color scheme), zoom, breakpointsMode, scroll sync. Empty outside responsive mode.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewports_set
Replace the whole viewport set left-to-right in one rebuild (prefer over repeated viewport_add). Exits breakpoints mode.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewports * | array |
viewport_add
Add one frame (inherits current edits for comparison). Omit size to copy the last viewport.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
height | number | |
name | string | |
width | number |
viewport_remove
Remove one frame by id. Removing the last leaves an empty canvas. Unavailable in breakpoints mode.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewportId * | number |
viewports_zoom
Canvas scale 0.25–2 (visual only; frames still report declared size, media queries unaffected).
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
zoom * | number |
breakpoints_overlay
One viewport per declared breakpoint. Fails when the page declares none.
| Parameter | Type | Description |
|---|---|---|
enabled * | boolean | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
audit_run
Full page audit like the Audit tab: accessibility (labels, button names, contrast, alt), performance measured on this load (LCP + element, CLS + moved elements, server time, render-blocking, uncompressed files, images, third parties), content (placeholder text, repeated words, staging links, broken images, old © year, vague link text, cut-off text), launch & privacy (security headers, mixed content, secret keys in scripts, trackers before cookie consent, privacy/terms links, favicon), accessibility extras (zoom blocked, small tap targets, missing focus ring, ARIA mistakes, autoplay sound), sl…
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_seo_audit
SEO audit (title, description, h1, robots, alt text, OG tags…, plus robots.txt incl. AI assistant bots, sitemap, llms.txt and soft 404s) with severity + recommendations.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_meta
Meta values grouped SEO / Open Graph / Twitter. Read before social-card previews.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_weight
Byte breakdown: scripts, stylesheets, images, fonts, fetch, media, other + document size.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
css_variables
Every --* custom property in the cascade. Read before authoring CSS so agents reuse var(--foo).
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_typography
Font family/stack/size/weight/spacing/transform inside a subtree, with using selectors.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
css_specificity
Specificity of any selector as tuple + comparable score. Use before writing overrides.
| Parameter | Type | Description |
|---|---|---|
selector * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_colors
Distinct text/background/border colors rendered in a subtree (incl. gradients, canvas samples).
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_assets
Images, SVGs, data URLs in a subtree with URL/content + rendered dimensions.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
element_layout
Flex/grid breakdown (direction, justify, align, gap, templates). Null when neither.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
viewportId | number | Responsive mode only: viewport from viewport_state that should answer. Element ids are per-viewport — only pass ids that came from this viewport. |
element_force_state
Force hover/focus/active/visited/focus-visible/focus-within to preview rendering; empty clears. Not in responsive mode.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
state * | string | |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
page_tech_stack
Frameworks/CMS/analytics with versions. Call first on a new task — the stack shapes suggestions.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
get_a11y_issues
WCAG contrast on the page: text measured by axe-core (AA failures, AAA misses, and kind "unknown" for text it could not measure, e.g. over a photo) plus single-colour SVG icons (3:1), worst first.
| Parameter | Type | Description |
|---|---|---|
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
limit | number | Max issues (default 50). |
element_tailwind
Computed styles → Tailwind v4 utilities. Pair with element_set_classes to apply.
| Parameter | Type | Description |
|---|---|---|
elementId * | string | Element id from an earlier element tool. |
tabId * | number | Id of a tab where TruePx is on, from tabs_list. |
css_fetch_stylesheet
Raw CSS of an external stylesheet URL, fetched from the extension service worker (cross-origin reachable). HTTP(S) only; localhost/private IPs blocked.
| Parameter | Type | Description |
|---|---|---|
url * | string |