chrome-mcp
Tools

Reading

Get the page back as text, markdown, HTML, an accessibility snapshot, a screenshot or a PDF.

Generated from @mehmoodqureshi/chrome-mcp 0.9.11. 8 tools.

snapshot

Accessibility snapshot: interactive elements with refs to target by ref (more reliable than guessing CSS selectors). Pass diff:true to get only what changed since the last snapshot of this tab - far cheaper in a click/read loop. Password fields appear as secret:true with no value.

ArgumentTypeRequiredDescription
interactiveOnlybooleanno
maxnumberno
diffbooleannoReturn added/removed/changed elements since the previous snapshot of this tab instead of the whole tree
failOnAuthWallbooleannoError with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session)
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
tabIdstringnoTab id (default: active tab)
{
  "tool": "snapshot",
  "args": {
    "interactiveOnly": true
  }
}

get_text

Get visible text of the page or an element.

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or pass ref)
refstringnoElement ref from a snapshot
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
tabIdstringnoTab id (default: active tab)
maxBytesnumbernoCap returned content at N UTF-8 bytes (default 262144); the full payload still lands in results/
{
  "tool": "get_text",
  "args": {
    "selector": "<selector>"
  }
}

read_as_markdown

Read the page (or subtree) as readable markdown.

ArgumentTypeRequiredDescription
selectorstringno
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
tabIdstringnoTab id (default: active tab)
maxBytesnumbernoCap returned content at N UTF-8 bytes (default 262144); the full payload still lands in results/
{
  "tool": "read_as_markdown",
  "args": {
    "selector": "<selector>"
  }
}

get_html

Get HTML of the page or an element. Output is capped (see maxBytes) and cut at a tag boundary; narrow it with selector rather than raising the cap when you can. Password field values are always blanked.

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or pass ref)
refstringnoElement ref from a snapshot
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
outerbooleanno
tabIdstringnoTab id (default: active tab)
maxBytesnumbernoCap returned content at N UTF-8 bytes (default 262144); the full payload still lands in results/
{
  "tool": "get_html",
  "args": {
    "selector": "<selector>"
  }
}

Extract anchors from the page or a subtree. dedupe=true collapses links sharing an href (nav/footer noise); limit caps the count.

ArgumentTypeRequiredDescription
selectorstringno
sameOriginOnlybooleanno
dedupebooleanno
limitnumberno
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
tabIdstringnoTab id (default: active tab)
{
  "tool": "extract_links",
  "args": {
    "selector": "<selector>"
  }
}

screenshot

Capture a screenshot (page or element). Default is JPEG (quality 70) at CSS-pixel size, which is several times smaller than PNG and reads fine. Pass format:"png" for lossless, quality 1-100 for JPEG, scale 2 for device pixels on a Retina display or 0.5 to shrink.

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or pass ref)
refstringnoElement ref from a snapshot
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
fullPagebooleanno
format"jpeg" | "png"no
qualitynumberno
scalenumberno
tabIdstringnoTab id (default: active tab)
{
  "tool": "screenshot",
  "args": {
    "selector": "<selector>"
  }
}

Render the page to PDF through Chrome's own print pipeline and save it to the task's results/ dir. Returns the path and size, not the bytes - a PDF is not something to spend context on.

ArgumentTypeRequiredDescription
landscapebooleanno
printBackgroundbooleannoInclude background graphics (default true)
scalenumberno0.1 - 2.0
paperWidthnumbernoInches
paperHeightnumbernoInches
pageRangesstringnoe.g. '1-3, 5'
preferCSSPageSizebooleanno
tabIdstringnoTab id (default: active tab)
{
  "tool": "print_pdf",
  "args": {
    "landscape": true
  }
}

frames_list

List the tab's frames (the top document plus every iframe the extension can reach), with each frame's id and URL. Use it when a selector that should match does not: the element is probably in one of these frames, and you can then pass frameId (or allFrames:true) to act inside it.

ArgumentTypeRequiredDescription
tabIdstringnoTab id (default: active tab)
{
  "tool": "frames_list",
  "args": {}
}

On this page