Tauri Hasgard
v0.8.4Inspect and drive a running Tauri app's native webviews: snapshot, click, type, screenshot.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
hasgard.assert_checked
Assert that a checkbox or radio target is checked.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.assert_contains
Assert that target text contains a substring.
| Parameter | Type | Description |
|---|---|---|
expected * | string | Expected value or substring. |
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.assert_count
Assert the number of elements matching a selector.
| Parameter | Type | Description |
|---|---|---|
expected * | integer | Expected element count. |
selector * | string | CSS selector to count. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.assert_text
Assert exact text content for an element target.
| Parameter | Type | Description |
|---|---|---|
expected * | string | Expected value or substring. |
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.assert_url
Assert that the current URL contains a substring.
| Parameter | Type | Description |
|---|---|---|
expected * | string | Expected value or substring. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.assert_value
Assert an input, textarea, or select value.
| Parameter | Type | Description |
|---|---|---|
expected * | string | Expected value or substring. |
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.assert_visible
Assert that an element target is visible.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.attrs
Get all HTML attributes for an element target.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.blur
Remove keyboard focus from an element target.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.bounding_box
Get an element's position and size in viewport pixels.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.check
Set a checkbox or radio element. Pass `checked` to drive it to a state (idempotent); omit it to toggle.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
checked | boolean | Drive the box to this state instead of toggling. Idempotent, so a retry cannot invert it. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.checked
Report whether a checkbox or radio is checked.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.clear
Empty an input, firing the same events as fill.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.click
Click an element target by ref, selector, or coordinates, with optional modifiers, button, click count, and in-element position.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
button | string | Which button. right raises contextmenu and middle raises auxclick; neither raises click. |
clickCount | integer | Presses in one gesture. 2 also raises a single dblclick. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
modifiers | array | Modifiers held for the whole gesture. Meta is Command on macOS. |
position | object | Offset from the element's top-left corner. Defaults to its centre. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.clipboard
Read or write the system clipboard's text, to check a copy action or prepare a paste. The clipboard is shared with the user of the machine.
| Parameter | Type | Description |
|---|---|---|
action * | string | read returns the text, or null when there is none; write replaces it. |
text | string | Text to place on the clipboard, for write. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.cookies
Read, set or delete cookies in the webview's own store, HttpOnly cookies included. Use it to start signed in or to assert on a session cookie.
| Parameter | Type | Description |
|---|---|---|
action * | string | get lists, set writes one cookie, clear deletes. |
domain | string | Cookie domain: for set when no url is given, a filter for clear. |
expires | integer | Expiry for set, in seconds since the Unix epoch. A session cookie when omitted. |
http_only | boolean | Hide the cookie from page script, for set. |
name | string | Cookie name: required for set, a filter for get and clear. |
path | string | Cookie path for set. Defaults to /. |
same_site | string | SameSite policy for set. |
secure | boolean | Send only over https, for set. Defaults to true for an https url. |
url | string | For set, supplies the domain, the path / and secure for https. For get and clear, limits to the cookies a request to this URL would carry. |
value | string | Cookie value, for set. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.count
Count the elements a CSS selector matches.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector to count matches of. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.dblclick
Double-click an element target by ref, selector, or coordinates.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.dialog
Inspect or set how modal dialogs (alert/confirm/prompt) are answered. The policy is standing, not per-dialog, and defaults to dismiss.
| Parameter | Type | Description |
|---|---|---|
action * | string | One of: accept, dismiss, list, clear. |
prompt_text | string | Text submitted to a prompt when action is accept. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.diff
Compare the current webview to the previous or supplied snapshot.
| Parameter | Type | Description |
|---|---|---|
depth | integer | Maximum traversal depth. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
interactive | boolean | Only include interactive elements. |
reference | Optional prior snapshot object to compare against. | |
selector | string | CSS selector to scope the new snapshot. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.disabled
Report whether an element is disabled, by property or aria-disabled.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.downloads
The files a webview downloads. wait answers with a finished download no earlier wait answered with, and the path it was saved to; it may be called after the action that downloads. One nobody waited for answers the next wait: clear first to start fresh. On CEF call set_directory first. Available where the application passes Hasgard's observer to its download hook.
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do. |
path | string | For set_directory: an absolute directory for later downloads. Omit to reset. |
since_id | integer | For wait: only a download started after this id. |
timeout | integer | For wait: how long, in milliseconds. Defaults to 10000. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.drag
Drag an element to another target or by an offset.
| Parameter | Type | Description |
|---|---|---|
source * | string | Source element ref, selector, or coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
offset | Optional offset object such as {"x": 0, "y": 100}. | |
target | string | Destination element ref, selector, or coordinates. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.event
Tauri events. emit delivers one to the application, as its backend would; listen starts recording an event the application emits, and list shows what was recorded.
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do. |
event | string | Event name. Required for emit, listen and unlisten; a filter for list. |
payload | For emit: the payload, any JSON value. | |
since_id | integer | For list: only events recorded after this id. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.fill
Clear and fill an input target with a value.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
value * | string | Value to set. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.focus
Give keyboard focus to an element target.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.forms
Dump all form fields in the webview document or inside a selector.
| Parameter | Type | Description |
|---|---|---|
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
selector | string | Optional CSS selector. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.heap_snapshot
Write a JavaScript heap snapshot of the target webview after a full GC: JavaScriptCore inspector JSON on macOS, V8 .heapsnapshot on Windows.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Absolute output path; its directory must exist. Replaced if present. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.hover
Move the pointer over an element target.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.html
Get inner HTML for an element target, or the full webview document if target is omitted.
| Parameter | Type | Description |
|---|---|---|
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
target | string | Optional element ref, CSS selector, or x,y coordinates. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.logs
Read or clear captured console logs.
| Parameter | Type | Description |
|---|---|---|
clear | boolean | Clear the log buffer instead of reading it. |
last | integer | Return only the last N log entries. |
level | string | Optional log level filter. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.native_dialog
Answer the dialog plugin's native open, save and message dialogs in advance, since nothing can click an operating-system dialog. Set the policy before the action that opens one. The default, manual, leaves them on screen.
| Parameter | Type | Description |
|---|---|---|
action * | string | accept and dismiss answer every later native dialog; manual stops answering; list shows what was answered; clear forgets the record. |
button | string | For accept: the message dialog button to press, by its label. |
paths | array | For accept: what an open or save dialog returns. Several for an open dialog that allows them. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.network
Read or clear captured network requests.
| Parameter | Type | Description |
|---|---|---|
clear | boolean | Clear the request buffer instead of reading it. |
failed | boolean | Only return failed requests. |
filter | string | Optional URL substring filter. |
last | integer | Return only the last N requests. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.ping
Check connectivity with the running Tauri app.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.press
Press a keyboard key.
| Parameter | Type | Description |
|---|---|---|
key * | string | Native keyboard key to press; respects the active input method. |
completion | string | webview waits for trusted keyup (default); native confirms OS posting only for native shortcuts or navigation. |
timeout | integer | Postcondition timeout in milliseconds; requires wait_for. |
wait_for | string | JavaScript postcondition to await before another native press may focus a window. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.query
Find elements by text, label, placeholder, test id, alt, or title. Matches against the live DOM, so each naming source is searchable independently rather than through the single collapsed `name` a snapshot reports.
| Parameter | Type | Description |
|---|---|---|
by * | string | Dimension to match: text, label, placeholder, testid, alt, title, or role. role reports what a snapshot would for that role without resetting snapshot refs. |
value * | string | Value to match against the chosen dimension; the role itself for by: role. |
exact | boolean | Require a full, case-sensitive match. Test ids are always exact regardless. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
name | string | With by: role, keep elements whose accessible name contains this text (case-sensitive), or equals it with exact. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.record_start
Start recording app interactions.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.record_status
Get recorder status.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.record_stop
Stop recording and return recorded entries.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.replay
Replay or export a recorded tauri-hasgard session file.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to a recording JSON file. |
export | string | Export format instead of replaying. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.route
Shape what the page's own fetch and XHR requests receive, without a real backend. Rules match a URL glob in registration order, first match wins.
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do. |
body | string | Response body for fulfill. |
content_type | string | Response content type for fulfill. Defaults to text/plain. |
method | string | Restrict to one HTTP verb. Any verb matches when omitted. |
pattern | string | URL glob, required for fulfill and abort. `*` stays inside one path segment, `**` crosses separators, and the pattern must match the whole URL. |
status | integer | HTTP status for fulfill. Defaults to 200. |
times | integer | Stop matching after this many requests, letting later ones through. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.run_scenario
Run TOML scenario steps against this application; failures are tool errors. No [connect] overrides.
| Parameter | Type | Description |
|---|---|---|
toml * | string | TOML scenario with one or more [[step]] entries. |
fail_fast | boolean | Override scenario fail_fast. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.screenshot
Capture the full webview document or an element selector. Returns the PNG as image content.
| Parameter | Type | Description |
|---|---|---|
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
selector | string | Optional CSS selector. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.screenshot_native
Write a PNG of rendered pixels to `output_path`: the routed webview via WebKit when `window_id` is omitted, or the on-screen window with that id. Returns path + metadata; never inlines bytes.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Absolute path where the PNG is written. The parent directory must already exist; the file is written atomically via a temp + rename. |
format | string | Image format. v1 accepts only "png". |
window | string | Optional Tauri window label overriding the MCP server default. |
window_id | integer | Native window id (e.g. `CGWindowID` on macOS) to capture a whole window. Omit to render the routed webview through WebKit (exact pixels, scrolled content included, no screen-recording permission). Mus… |
hasgard.scroll
Scroll the webview document or an element ref.
| Parameter | Type | Description |
|---|---|---|
amount | number | Pixels to scroll. 300 when omitted. |
direction | string | Direction to scroll. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
ref | string | Optional element ref, with or without @. |
target | string | Scroll this element instead of the document: ref, CSS selector, or x,y. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.select
Select an option in a select element, or a set of options in a multiple one.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
value | string | The option to select, by its value or visible label. |
values | array | For a multiple select: exactly this set becomes selected. Use instead of value. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.set_input_files
Attach local files to an <input type="file">. An empty list clears the selection.
| Parameter | Type | Description |
|---|---|---|
files * | array | Local file paths to attach. Empty clears the selection. |
target * | string | The <input type="file"> ref, selector, or coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.snapshot
Capture an accessibility snapshot of the WebView.
| Parameter | Type | Description |
|---|---|---|
depth | integer | Maximum traversal depth. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
interactive | boolean | Only include interactive elements. |
selector | string | CSS selector to scope the snapshot. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.state
Get webview URL, title, viewport, and scroll state.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.storage_clear
Clear localStorage or sessionStorage.
| Parameter | Type | Description |
|---|---|---|
session | boolean | Use sessionStorage instead of localStorage. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.storage_get
Read a localStorage or sessionStorage key.
| Parameter | Type | Description |
|---|---|---|
key * | string | Storage key. |
session | boolean | Use sessionStorage instead of localStorage. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.storage_list
List localStorage or sessionStorage entries.
| Parameter | Type | Description |
|---|---|---|
session | boolean | Use sessionStorage instead of localStorage. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.storage_set
Set a localStorage or sessionStorage key.
| Parameter | Type | Description |
|---|---|---|
key * | string | Storage key. |
value * | string | Storage value. |
session | boolean | Use sessionStorage instead of localStorage. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.text
Get text content for an element target.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.title
Get the current webview title.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.type
Type text into an element target without clearing it first.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
text * | string | Text to type. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.url
Get the current webview URL.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.value
Get an input, textarea, or select value.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.video_start
Start bounded native window MP4 recording on macOS; requires ffmpeg and Screen Recording permission.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Absolute .mp4 output path; must not exist. |
fps | integer | |
max_duration_ms | integer | |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.video_status
Read native video session status.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.video_stop
Stop recording and return the published MP4; propagates capture/encoder failures.
| Parameter | Type | Description |
|---|---|---|
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.visible
Report whether an element is visible. Unlike assert_visible, a hidden element is an answer, not a failure.
| Parameter | Type | Description |
|---|---|---|
target * | string | Element ref, CSS selector, or x,y coordinates. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.wait
Wait for an element or condition.
| Parameter | Type | Description |
|---|---|---|
expression | string | JavaScript expression to poll until it returns a truthy value, which is then returned. Catches conditions that flip without a DOM mutation. Cannot be combined with selector or gone. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
gone | boolean | Wait for the element to disappear. |
load | string | Wait for a load state: load or domcontentloaded. Combines with url. |
poll | integer | How often to re-evaluate `expression`, in milliseconds. |
selector | string | CSS selector to wait for. |
target | string | Element ref, CSS selector, or x,y coordinates. |
timeout | integer | Timeout in milliseconds. |
url | string | Wait until the window is at this URL instead of waiting for an element. A glob: `*` stays within a path segment, `**` crosses them. Holds across the navigation that gets there. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.watch
Watch for DOM mutations until the webview document is stable.
| Parameter | Type | Description |
|---|---|---|
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
require_mutation | boolean | Defer the stability timer until at least one DOM mutation occurs. Rejects on timeout when nothing changed. |
selector | string | CSS selector to scope observation. |
stable | integer | Stability window in milliseconds. |
timeout | integer | Timeout in milliseconds. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.wheel
Scroll by wheel, letting the page cancel it as a real wheel would. Omit target to scroll the page.
| Parameter | Type | Description |
|---|---|---|
delta_x | number | Horizontal scroll delta in pixels. |
delta_y | number | Vertical scroll delta in pixels. |
frame | array | Scope to a same-origin iframe: one CSS selector per nesting level, outermost first. Cross-origin frames are unreachable. |
target | string | Scrollport ref or selector. Omit to scroll the page. |
window | string | Optional Tauri window label overriding the MCP server default. |
hasgard.window
Read or change the native window: state, resize, move, minimize, maximize, restore, close. Sizes and positions are logical pixels.
| Parameter | Type | Description |
|---|---|---|
action * | string | state reports position, size and flags; the others change the window and report its state. |
height | number | Content height for resize. |
width | number | Content width for resize. |
window | string | Optional Tauri window label overriding the MCP server default. |
x | number | Left edge for move, from the screen origin. |
y | number | Top edge for move, from the screen origin. |
hasgard.windows
List all open Tauri windows.