Skip to content

outline

Kelly Ferrone edited this page Sep 15, 2026 · 1 revision

outline

Map what is on the page: every element worth acting on, with a selector for it and whether it can actually be used.

MCP tool outline
HTTP POST /browser/outline

This is how you find selectors - not by reading HTML with extract, and not by writing a script to walk the DOM. Each entry carries one selector, checked to match exactly one element, as css where the page gives something stable and xpath by text where it does not.

visible says whether it can be used now, and reason says what is in the way when it cannot: hidden (an ancestor is display:none - often a menu that opens on hover), covered (blocked_by names what is on top), zero_size, offscreen, disabled.

Scope it with xpath or css to one part of the page, filter by text to find one thing by its label, and raise limit when 50 entries are not enough. interactive=false includes every element rather than only the ones you can act on.

Read it before acting, and again after a page changes under a flow you are repairing.

Parameters

Name Type Required Default Notes
xpath string no
css string no
text string no
limit integer no 50
interactive boolean no true
session_id string yes over HTTP The session_id returned by /browser/open. Required here.
url string no
wait_timeout integer no 30

Returns

Field Type Notes
count integer How many elements are listed.
elements array What is on the page, in document order.
url string Current URL after the action.
title string Page title after the action.

Errors

Status Means
400 The request cannot succeed as sent — a missing field, a value that was rejected, or a locator that matched nothing before the wait ran out. Do not retry it unchanged.
401 Missing or wrong bearer token.
404 No such browser session. It ended, the Grid reaped it, or the id was never real. Open a new one and retry.
500 Something failed that this server did not expect.
503 The Grid could not serve this — unreachable, or no free slot for a new browser. Worth retrying after a wait.

Over MCP the same failures arrive as a tool error.

Example

MCP

outline()

HTTP

curl -X POST $SELENIUM_FLOW/browser/outline \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "session_id": "…"
  }'

← All actions · Installing · Deployment

Clone this wiki locally