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.
| Argument | Type | Required | Description |
|---|---|---|---|
interactiveOnly | boolean | no | |
max | number | no | |
diff | boolean | no | Return added/removed/changed elements since the previous snapshot of this tab instead of the whole tree |
failOnAuthWall | boolean | no | Error with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session) |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
tabId | string | no | Tab id (default: active tab) |
{
"tool": "snapshot",
"args": {
"interactiveOnly": true
}
}get_text
Get visible text of the page or an element.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or pass ref) |
ref | string | no | Element ref from a snapshot |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
tabId | string | no | Tab id (default: active tab) |
maxBytes | number | no | Cap 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.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
tabId | string | no | Tab id (default: active tab) |
maxBytes | number | no | Cap 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.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or pass ref) |
ref | string | no | Element ref from a snapshot |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
outer | boolean | no | |
tabId | string | no | Tab id (default: active tab) |
maxBytes | number | no | Cap returned content at N UTF-8 bytes (default 262144); the full payload still lands in results/ |
{
"tool": "get_html",
"args": {
"selector": "<selector>"
}
}extract_links
Extract anchors from the page or a subtree. dedupe=true collapses links sharing an href (nav/footer noise); limit caps the count.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | |
sameOriginOnly | boolean | no | |
dedupe | boolean | no | |
limit | number | no | |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
tabId | string | no | Tab 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.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or pass ref) |
ref | string | no | Element ref from a snapshot |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
fullPage | boolean | no | |
format | "jpeg" | "png" | no | |
quality | number | no | |
scale | number | no | |
tabId | string | no | Tab id (default: active tab) |
{
"tool": "screenshot",
"args": {
"selector": "<selector>"
}
}print_pdf
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.
| Argument | Type | Required | Description |
|---|---|---|---|
landscape | boolean | no | |
printBackground | boolean | no | Include background graphics (default true) |
scale | number | no | 0.1 - 2.0 |
paperWidth | number | no | Inches |
paperHeight | number | no | Inches |
pageRanges | string | no | e.g. '1-3, 5' |
preferCSSPageSize | boolean | no | |
tabId | string | no | Tab 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.
| Argument | Type | Required | Description |
|---|---|---|---|
tabId | string | no | Tab id (default: active tab) |
{
"tool": "frames_list",
"args": {}
}