mantis

v0.1.14
io.github.perzianhq/mantis Checked 2 hours ago Published 23 days ago

The web as short, numbered text for AI agents: a lean browser interface over Playwright.

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

open

Open URL as numbered page text; act by #number.

ParameterTypeDescription
url *string

read

Numbered text; act by #number. ~"x" names are guesses. "Same as before" retains #numbers; region/full/fresh expands it; full is paged with offset. Verify the entity identity before editing. Before finishing, re-read and visibly verify every task constraint (filters, sort, size, quantity, date range). After an action confirms completion, stop and report it rather than re-inspecting. If #number is stale, read() and retry; if on the wrong page, back() and keep searching. open(url) returns to an earlier results page; back() can lose its query string.

ParameterTypeDescription
freshbooleanExpand seen regions too (this call only)
fullbooleanUntrimmed bounded excerpt; use offset for the next excerpt
offsetintegerCharacter offset for the next full excerpt
regionstringLabel substring, e.g. "nav"; if none matches, text inside a region also works

find

Case-insensitive whole-page text search, including trimmed content; returns #numbers, actionable row neighbours, and bounded local context. Give a list of up to 6 texts to search them all in one call. Use context_chars to expand just that local context; a matched heading is not a region label. With no match it scrolls virtualized lists and loads more of an infinite feed to look, and says so.

ParameterTypeDescription
text *
context_charsinteger

forget

Clear region memory; next read shows everything.

click

Click element #id.

ParameterTypeDescription
id *integer

type

Replace input #id text; submit presses Enter.

ParameterTypeDescription
id *integer
text *string
submitboolean

select

Choose option text in select or combobox #id. A <select multiple> takes a list and its selection becomes exactly that list. Matching ignores case, accents and punctuation.

ParameterTypeDescription
id *integer
option *

fill

Prefer one mixed call for related text, dropdown, and checkbox fields; unrelated fields stay unchanged. Verify entity identity before editing. On failure or rerender it stops and reports partial completion; after confirmed completion, report it rather than re-inspecting.

ParameterTypeDescription
fields *array

press

Press a key, e.g. Enter. For bottom-loaded feeds, try End (Control+End if no movement) to load more; a scroll key or scroll reports when the page grew; repeat only while new items appear.

ParameterTypeDescription
key *string

scroll

Scroll up/down/left/right (default down). id alone brings #id into view; id + direction scrolls its containing list/panel/table. For wide tables use right; without id, a scrollable container is used when the page cannot scroll.

ParameterTypeDescription
directionstring
idinteger

back

Back one page in history.

wait_for

Wait up to 10s: text states are present (or appears) / disappears; #id states are present / enabled. On timeout, inspect the returned current observation.

ParameterTypeDescription
idinteger
statestring
textstring
timeout_secondsnumber

hover

Hover element #id and show changes.

ParameterTypeDescription
id *integer

upload

Select local file path(s) on #id; this selects files but does not submit a form.

ParameterTypeDescription
id *integer
filesarray
pathstring
pathsarray

tabs

List tabs, or switch/close tab #id.

ParameterTypeDescription
actionstring
idinteger

media

Only if read is insufficient: media → data (prefer) → ocr → look (last resort) → ask_human. Numbered images/canvases/charts.

data

Prefer; text only. Extract image/SVG/chart alt, caption, text or Chart.js/ECharts/Highcharts values; a table gives its rows. id from read()/media(), or CSS selector (#N refs work too).

ParameterTypeDescription
idinteger
selectorstringCSS selector or #N ref

ocr

Text-only OCR for image/canvas. Use if data found nothing. id or CSS selector.

ParameterTypeDescription
idinteger
selectorstringCSS selector or #N ref

look

LAST RESORT; only image-returning tool (PNG, max 800px). Only after read/data/ocr failed, except use it on the relevant region for spatial or visual comparisons (charts, swatches, or drawn values): OCR text or an aria-label alone is not chart data. id or CSS selector.

ParameterTypeDescription
idinteger
selectorstringCSS selector or #N ref

ask_human

Human handoff for CAPTCHA, 2FA, payment or login; never solves CAPTCHAs. Waits for a page change, then returns the page.

ParameterTypeDescription
reason *stringWhat the human must do
timeout_secondsnumberDefault 300
untilstringurl_change | selector_gone:<css> | selector_present:<css>; default: URL or content change