MCP Tool Reference

PinchTab currently exposes 43 MCP tools. All tool names are prefixed with pinchtab_ and are served over stdio JSON-RPC.

For selector-based interaction tools, prefer selector. ref and query are still accepted as deprecated/alias fallbacks on the element-action tools (query is shorthand for find:<text>).

If you allow MCP browsing on non-local or non-trusted domains, treat pinchtab_snapshot and pinchtab_get_text output as untrusted page data. Those tools can surface hostile prompt text from visited pages; operators should keep IDPI/domain restrictions narrow unless wider access is intentional.

Selector forms include:

  • e5
  • #login
  • xpath://button
  • text:Submit
  • find:login button
  • role:button Save
  • label:Email, placeholder:Search, alt:Logo, title:Close, testid:submit
  • first:button, last:button, nth:2:button

Structured semantic locators are matched by the semantic engine; CSS, XPath, refs, the existing text: action selector, and bare CSS/text wrappers stay browser-side.

ToolKey ParametersNotes
pinchtab_navigateurl required, tabId, snapUses /navigate; omitting tabId opens a new tab. snap=true returns an interactive compact snapshot in the same response
pinchtab_snapshottabId, interactive, compact, format, diff, selector, maxTokens, depth, noAnimationsselector scopes the snapshot; format is limited to compact or text
pinchtab_frametabId, targetGet or set the frame scope for selector-based actions on the tab; target accepts main, a snapshot ref, an iframe selector, or a frame name/URL
pinchtab_screenshottabId, selector, scale, format, quality, annotate, beyondViewport, browserselector captures a specific element in current frame scope; scale rescales the output bitmap (e.g. 0.5 = half size); format is jpeg or png; annotate=true overlays numbered ref boxes and populates the annotations envelope; beyondViewport=true captures the full scrollable document (ignored when selector is set) — box coords are document-relative in that mode; browser selects the browser (e.g. chrome, cloak) for this request
pinchtab_capturetabId, selector, filter, format, quality, depth, scale, wait, withBounds, beyondViewport, requirePair, noAnimations, browserPaired screenshot + accessibility snapshot from the same DOM epoch. Returns an image content block plus a JSON envelope with epoch, pairing.navigated, per-node boundingBox, and image.coordinateSpace (viewport, document, or selector clip). browser selects the browser (e.g. chrome, cloak); the static ghost-chrome runtime cannot paint, so it falls back to chrome. Use when the model reads pixels AND acts on refs in the same turn.
pinchtab_get_texttabId, raw, format, maxCharsraw=true maps to /text?mode=raw; format=text/plain returns plain text; inherits the current pinchtab_frame scope for that tab

Interaction

All element-action tools accept the unified selector and the legacy aliases ref (deprecated) and query (semantic shorthand).

ToolKey ParametersNotes
pinchtab_clickselector, ref, query, tabId, x, y, nodeId, dialogAction, dialogText, waitNav, mode, snapClick element by selector or coordinate; mode accepts dom or dispatch as a broad low-level escape hatch for click delivery; mode and humanize are mutually exclusive; dialogAction handles a dialog opened by the click; waitNav=true waits for navigation; snap=true returns a snapshot
pinchtab_typeselector, ref, query, text required, tabIdSends key events at the targeted input
pinchtab_presskey required, tabIdPress a key such as Enter
pinchtab_hoverselector, ref, query, tabId, x, y, nodeIdHover an element or coordinate
pinchtab_focusselector, ref, query, tabId, nodeIdFocus element
pinchtab_selectselector, ref, query, value required, tabId, snapSelect <option> by value or visible text
pinchtab_scrollselector, ref, query, pixels, deltaX, deltaY, direction, steps, x, y, tabIdOmit selector to scroll the page; element + pixels uses wheel semantics; direction accepts up/down
pinchtab_scroll_into_viewselector, ref, query, tabIdScrolls the target into view and returns geometry for stable follow-up actions
pinchtab_fillselector, ref, query, value required, tabId, snapDirect fill via JS dispatch instead of keystrokes

Keyboard

ToolKey ParametersNotes
pinchtab_keyboard_typetext required, tabIdTypes at the currently focused element
pinchtab_keyboard_inserttexttext required, tabIdPaste-like insert without key events
pinchtab_keydownkey required, tabIdHold a key down
pinchtab_keyupkey required, tabIdRelease a key

Content

ToolKey ParametersNotes
pinchtab_evalexpression required, tabIdRequires security.allowEvaluate (documented non-default JS-execution opt-in). Not frame-scoped — current pinchtab_frame state does not change evaluation context
pinchtab_pdftabId, landscape, scale, pageRangesReturns base64-encoded PDF content
pinchtab_findquery required, tabIdSemantic element search; returns best_ref and selector hints to reuse in action tools

Site

ToolKey ParametersNotes
pinchtab_scrapeurl required, preview, only, maxPages, maxPerPattern, include, exclude, concurrency, enrichAll, noBrowser, timeoutSeconds, browserCrawl a whole site to a page tree of markdown via /scrape. HTTP-first extraction; only thin/blocked/failed pages are browser-rendered. preview=true returns a cheap outline (sizes + snippets, no bodies, no browser); only (comma-separated URLs) expands chosen pages at full fidelity. include/exclude are comma-separated regexes. Full reports can be large — prefer preview then expand. Runs with an extended timeout (multi-page crawls take minutes)

Tab Management

ToolKey ParametersNotes
pinchtab_list_tabsnoneLists open tabs
pinchtab_close_tabtabId optionalCloses the given tab, or the current/default tab when omitted
pinchtab_healthnoneChecks server health
pinchtab_cookiestabIdReads cookies for a tab; requires security.allowCookies
pinchtab_connect_profileprofile requiredReturns the connect URL and instance status for a profile

Wait Utilities

ToolKey ParametersNotes
pinchtab_waitms requiredFixed-duration wait, capped at 30000 ms
pinchtab_wait_for_selectorselector required, timeout, state, tabIdstate is visible (default) or hidden
pinchtab_wait_for_texttext required, timeout, tabIdWait for body text
pinchtab_wait_for_urlurl required, timeout, tabIdURL glob match
pinchtab_wait_for_loadload required, timeout, tabIdload is ready-state (readyState=complete), content-loaded (readyState in {interactive, complete}), or network-idle (0 in-flight requests for 500 ms)
pinchtab_wait_for_functionfn required, timeout, tabIdJS expression must become truthy

Network

ToolKey ParametersNotes
pinchtab_networktabId, filter, method, status, type, limit, bufferSizeLists recent network requests
pinchtab_network_detailrequestId required, tabId, bodybody=true includes response body when available
pinchtab_network_cleartabIdClears one tab or all tabs when omitted
pinchtab_network_routetabId required, pattern required, action, body, contentType, status, resourceType, methodInstall a request-interception rule on a tab. action is continue (default), abort, or fulfill. fulfill is blocked on hosts in security.allowedDomains and falls through to a real fetch on those hosts
pinchtab_network_unroutetabId required, patternRemove a tab’s interception rule by pattern, or all rules when pattern is omitted

Recording

ToolKey ParametersNotes
pinchtab_record_startfile required, fps, quality, scale, tabIdStart recording; format inferred from extension (.gif, .webm, .mp4). Requires security.allowScreencast. GIF works without ffmpeg
pinchtab_record_stopfile requiredStop recording, encode, and save to file. Encoding may take a while for long recordings
pinchtab_record_statusReturns active recording status (format, fps, duration, frame count)

Dialog

ToolKey ParametersNotes
pinchtab_dialogaction required, text, tabIdaction is accept or dismiss; text is used as the prompt response with accept

Return Shapes

Typical results:

  • navigation tools return JSON from the matching HTTP endpoint
  • pinchtab_snapshot returns text for compact/text formats and JSON otherwise
  • pinchtab_get_text returns plain text when format=text|plain, JSON otherwise
  • pinchtab_screenshot returns an MCP image content block (image/jpeg by default, image/png when format=png) plus a text block that is always the JSON envelope {"format", "annotations": [...]}annotations is [] by default and [{"ref","role","name","tag","box":{"x","y","w","h"}}, ...] when annotate=true
  • pinchtab_pdf returns JSON containing a base64-encoded PDF payload
  • wait tools return wait status JSON
  • network tools return the same request logs you would see from /network

Security note:

  • extracted text and snapshot content should be treated as untrusted content from the visited page, not as trusted instructions
  • widening IDPI allowlists or disabling strict protections increases the chance that prompt-injection text reaches downstream agent logic

For setup and client configuration, see MCP Server.

Saved browser state is intentionally not exposed as MCP tools right now. Use the CLI or HTTP API for GET /state, pinchtab state, and saved-state persistence operations.