omnisnap

v0.6.0
io.github.developerpagadi/omnisnap Checked 3 days ago Published 17 days ago

Stability-scored test selectors, design tokens and captures from your real, logged-in browser.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

omnisnap_status Bridge status

Reports whether the OmniSnap browser extension is paired with this server, and which tab is active. Call this first when any other OmniSnap tool fails, and to get pairing instructions.

list_tabs List open tabs

Lists the open browser tabs OmniSnap can act on, with their titles and URLs. Use it to find the right tab before capturing or collecting selectors.

capture_page Capture the page

Takes a screenshot of the active tab and returns it as an image the model can see. Captures the full scrollable page by default, including pages that scroll inside a panel. Use it to check layout, verify a fix visually, or see what the user is describing.

ParameterTypeDescription
modestring"full" stitches the whole page, "viewport" takes only what is on screen.
viewportstringRender the page at a breakpoint before capturing. "current" uses the window as it is.

capture_element Capture one element

Screenshots a single element, given a CSS selector. Cheaper and far easier to reason about than a full page when the question is about one component.

ParameterTypeDescription
elementintegerA number from the most recent annotate_interactive on this tab. Easier and safer than retyping a selector.
selectorstringA CSS selector for the element to capture.

annotate_interactive Numbered map of interactive elements

Returns a screenshot with every interactive element outlined and numbered, plus a table mapping each number to its best selector and a stability score. This is the tool to use before acting on a page: look at the image, pick a number, then use that number's selector. Far more reliable than guessing a selector from the DOM.

ParameterTypeDescription
includestring"controls" covers buttons, inputs and selects; "all" adds links and landmarks.
viewportstringRender the page at a breakpoint before capturing. "current" uses the window as it is.

collect_selectors Selectors for an element

Given a description or a CSS hint, returns every selector that could reach the element, ranked by how likely it is to survive a redeploy and checked against the live page so you know whether it matches one element or several. Prefer the top result. A selector built on a generated class such as css-1x2y3z is scored down because it changes whenever the bundler runs.

ParameterTypeDescription
elementintegerA number from the most recent annotate_interactive on this tab. Easier and safer than retyping a selector.
hintstringA CSS selector, visible text, or an accessible name identifying the element.

get_page_object Page object for a framework

Exports the selectors collected in the browser as a ready page object. The best selector differs per framework: Playwright can match a role and an accessible name, Selenium cannot and falls back to CSS or XPath for the same element, so always pass the framework you are actually writing for.

ParameterTypeDescription
framework *stringThe test framework the output should be written for.

verify_selectors Check selectors still match

Takes a list of selectors and reports, for each, how many elements it matches on the page now. Use it to find selectors that have rotted after a UI change, before a test run does.

ParameterTypeDescription
selectors *arrayCSS or XPath selectors to check.

get_diagnostics Page health and failures

Returns Web Vitals, failed and slow network requests, console errors, storage use and the exact browser environment for the active tab. This is measured in the user's real session, so it reflects their network, their extensions and their data, which a clean automated browser cannot show you.

get_design_tokens Colours, type and spacing

Extracts the design system the page actually uses: palette with contrast audit, type scale, radii, shadows and spacing. Use it to match a new component to an existing product, or to find accessibility problems in the live UI. Ask for "markdown" when the answer should outlive the conversation: it returns a design document to commit beside the code, dated, because a snapshot with no date on it eventually becomes a lie.

ParameterTypeDescription
formatstringOutput shape. "css" emits custom properties, "markdown" a DESIGN.md the team can commit so the next question about spacing does not need the browser again.

diff_capture What changed since last time

Remembers the page as it is now, or, if it already has a baseline for this URL, returns the regions that moved since then, outlined on the newer frame. This is the loop to use when editing: call it once before your change, make the change, then call it again. Two screenshots answer "did it land" badly, because the eye has to hunt and most of the frame is identical. The baseline is per URL and is forgotten when the browser idles, which is deliberate: one that outlived the session would quietly compare against yesterday.

ParameterTypeDescription
resetbooleanReplace the baseline with the current page instead of comparing.

audit_page Problems only a rendered page has

Audits the live page for defects that exist only once it has rendered, and that reading the source cannot find: a control with something painted over it, text cut off by its own container, a page that scrolls sideways, a webfont that never arrived, images with no reserved space, and text too small to read. Use it after a layout change, at a width you do not normally look at, or when a user says a button "does nothing" and the code looks fine. The covered-control check answers that one directly: it asks what a click at the button would actually hit.

measure_accessibility Accessibility check

Audits the live page for contrast failures, missing accessible names, skipped heading levels and touch targets below the minimum size. Returns the offending elements with selectors.

inspect_element Measurements for one element

Returns the box model, computed typography, colours and spacing for a single element. Use it when a design question needs numbers rather than a picture.

ParameterTypeDescription
elementintegerA number from the most recent annotate_interactive on this tab. Easier and safer than retyping a selector.
selectorstringA CSS selector for the element to measure.

scroll_to Move the viewport

Scrolls the page. Use it to see the rest of a page: annotate_interactive and the screenshots only cover what is on screen, and its "coverage" field says how much of the page that is. Scroll, then capture again. This moves the camera, not the hands: it cannot click, type or navigate.

ParameterTypeDescription
elementintegerA number from the most recent annotate_interactive on this tab. Easier and safer than retyping a selector.
selectorstringScroll until this element is centred.
tostring"next" and "previous" move by about one screen.
ynumberAn absolute scroll position in CSS pixels.

await_user_selection Ask the user to point at it

Arms the element picker in the browser and waits for the user to click the elements they mean, then returns them with ranked selectors. Use this instead of guessing when a page has several things that match the description ("the save button", "that broken card"), or when you cannot find what the user is describing. Asking costs one turn; picking the wrong element costs the whole task.

ParameterTypeDescription
timeoutMsintegerHow long to wait for the user. They need time to find the element.

read_page The page as text

Returns the page's text and heading outline. Use this first when the question is what the page says rather than what it looks like: it costs a fortieth of a screenshot and a model reads a paragraph far more reliably than a picture of one. Reach for a capture when the question is visual.

ParameterTypeDescription
limitintegerMaximum characters.
scopestring"page" prefers the main content region; "viewport" is only what is on screen.

propose_action Ask the user to approve an action

Proposes clicking an element or typing into a field. The extension outlines the element and asks the user to approve; nothing happens unless they do. Use it to reach states that only exist after an interaction: an open menu, a validation error, the next step of a form. That is where most defects are. The user may decline. If they do, do not retry: ask them what they want instead.

ParameterTypeDescription
action *stringWhat to propose.
elementintegerA number from the most recent annotate_interactive on this tab. Easier and safer than retyping a selector.
selectorstringA CSS selector, or the visible text.
timeoutMsintegerHow long to wait for the user to answer.
valuestringFor "type": the text to enter.

set_viewport Show the page at another width

Holds the page at a phone, tablet or desktop width, and leaves it there. Every tool afterwards, including the numbered map, the accessibility audit and the measurements, then answers about that width, which is how you find what is wrong at 375px rather than just noticing that something is. Call it with reset to give the page back. Chrome shows a debugging banner while this is held; that is Chrome, not the page.

ParameterTypeDescription
heightinteger
presetstring375, 768 or 1440.
resetbooleanHand the page back at its real size.
widthinteger

set_color_scheme Light or dark

Shows the page as if the user preferred light or dark, without them changing anything. Dark mode is where contrast regressions hide, because it is the theme nobody screenshots. Use "auto" to hand it back.

ParameterTypeDescription
scheme *string

hover Hover and photograph

Puts the pointer on an element and returns a screenshot of what that reveals: dropdowns, tooltips, hover styling. These states cannot be reached any other way: a synthetic event fires the page handlers but leaves the CSS untouched, so this uses a real pointer move. Nothing is clicked.

ParameterTypeDescription
elementintegerA number from the most recent annotate_interactive on this tab. Easier and safer than retyping a selector.
selectorstring

focus_element Focus and photograph

Focuses an element and returns a screenshot. Use it to check focus rings, which are the most commonly missing accessibility feature and are invisible in an ordinary capture.

ParameterTypeDescription
elementintegerA number from the most recent annotate_interactive on this tab. Easier and safer than retyping a selector.
selectorstring

watch_page Watch for a while

Watches the page for a number of seconds and reports the console errors, failed requests and layout shifts that happen during it. Every other tool here asks a question and gets an answer as of that instant; most of what goes wrong does not wait to be asked. Use it while the user reproduces something, or just after a change, when asking afterwards would find a page that looks fine.

ParameterTypeDescription
secondsintegerHow long to watch.

capture_matrix The page at three widths

Captures the full page at phone, tablet and desktop widths and returns them side by side in one image. Use it to check a responsive change in a single look, rather than three captures you have to hold in mind at once.

ParameterTypeDescription
widthsarrayDefaults to all three: 375, 768 and 1440.