Skip to main content
Glama
patchright-mcp

patchright-mcp

by quantmew

extract

Retrieve page text, HTML, screenshots, cookies, localStorage, or selected elements from a browser session using stored browser and page IDs.

Instructions

Extract content from page (text, html, screenshot, cookies, localStorage, elements)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "browserId": "<browserId>",
      "pageId": "<pageId>",
      "type": "<type>"
    },
    "name": "extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesType of content to extract
pageIdYesPage ID from a previous browse operation
optionsNo
selectorNoCSS selector for element-specific extraction
browserIdYesBrowser ID from a previous browse operation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full disclosure burden, yet it says nothing about whether extraction is read-only, whether it requires a live browser session, whether it can fail or time out, or what it returns. Enumerating the content types hints at behavior but does not disclose any of the operational traits an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single front-loaded fragment with no filler; the parenthetical list is dense but informative. It is efficient, though the terseness leaves no room for the behavioral context this tool lacks elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a five-parameter tool with a nested options object, three required IDs sourced from a prior operation, and no output schema, yet the description explains no return shape and no prerequisite chain. For a multi-mode extraction tool with zero annotations, the definition leaves too much unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, so the schema already documents type, pageId, browserId, selector, and the nested options. The description's parenthetical merely restates the type enum values without adding meaning such as which types require a selector or which honor the screenshot options.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (extract) and resource (content from a page), and enumerates the six extraction modes, which lets an agent separate this from navigation/interaction siblings like browse, navigate, and interact. It stops short of explicitly contrasting itself with those siblings, so it is clear but not maximally differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose this over browse or interact, no statement of prerequisites (that browserId and pageId must come from a prior browse call), and no exclusions. The only implied usage is the parenthetical list of content types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools