Skip to main content
Glama
Pagewright (browser-mcp)

Pagewright (browser-mcp)

by zamansheikh

browser_extract

Read-only

Extract structured records from the current browser page using CSS selectors, including repeated items, attributes, and numeric fields; optionally save results as JSON or CSV.

Instructions

Extract structured data from the current page. Give itemSelector (one element per record, e.g. ".product") and fields relative to each item, e.g. {"name": "h2", "price": {"selector": ".price", "type": "number"}, "url": "a@href", "image": "img@src"}. Without itemSelector, fields are read once from the whole page.

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": {
      "fields": "<fields>"
    },
    "name": "browser_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax items (default 1000).
tabIdNoTab to act on. Defaults to the tab last opened/selected by an agent, else the active tab.
fieldsYesMap of output field -> spec. Spec is a CSS selector string relative to each item ("h2", "a.title@href" to read an attribute, "." for the item itself) or an object {selector, attr: "text"|"html"|"href"|"src"|"value"|<attribute>, all: bool (return every match as an array), type: "number", regex: "capture (group)"}.
savePathNoSave results as .json or .csv.
itemSelectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.7/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read with no mutations. The description adds scope context (operation targets the current page) and mode behavior, but says nothing about what happens on selector misses, whether extraction waits for dynamic content, or how results are shaped, which matters for a scraping tool on live pages.

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

Conciseness5/5

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

Three sentences, front-loaded with the purpose and then the two usage modes, with the example embedded where it is needed. No filler or restatement of the tool name; the itemSelector caveat is placed as the closing sentence where it belongs.

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

Completeness4/5

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

For a five-parameter tool with nested object specs and no output schema, the description covers the two extraction modes and the shape of the fields map well enough to call correctly. The remaining gap is that result shape (array of records versus single object, interaction with limit and savePath) is only implied.

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

Parameters4/5

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

Schema coverage is already 80%, so the baseline is 3, and the description earns an extra point by giving a worked field-map example covering a plain selector, attribute syntax ("a@href", "img@src"), and a nested typed spec ({"selector": ".price", "type": "number"}). That concretely illustrates how itemSelector and fields compose, going beyond the schema's abstract wording.

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 opens with a specific verb and resource ("Extract structured data from the current page") and immediately distinguishes its two operating modes: per-item records via itemSelector versus a single whole-page read. It never names or contrasts with a sibling such as browser_scrape, browser_get_content, or browser_evaluate, so an agent cannot rule out alternatives from the text alone.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the itemSelector/no-itemSelector split tells the agent which mode to pick for repeated records versus single values. There is no explicit when-to-use guidance, no prerequisites, and no mention of when a different extraction tool should be preferred.

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