Skip to main content
Glama

Extract data from the current page

browser_extract
Read-only

Use for: pulling repeated elements (prices, titles, links) from the page a session is on, via a CSS selector, or the full page text when no selector is given. Returns one string per matched element. Don't use when: the page has not been loaded yet — call browser_navigate first. Paid: $0.005 per call via x402 (Base USDC, Solana USDC, or XRPL XRP).

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

Input Schema

NameRequiredDescriptionDefault
selectorNoCSS selector to extract. Omit for full page text.
attributeNoAttribute to read instead of text, e.g. href or src.
session_idYesSession ID. Reuse the same ID to keep cookies, login state and page position across calls; a new ID starts a fresh browser.

Output Schema

NameRequiredDescriptionDefault
countYes
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so safety is covered; the description goes further by disclosing the paid x402 pricing model ($0.005/call across three chains) and the prerequisite that a page must already be loaded. It also states the return shape (one string per element), though that partially duplicates the output schema.

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?

Front-loaded 'Use for / Don't use when / Paid' structure makes it scannable with no filler sentences. The pricing clause is dense but earns its place since it gates whether the agent should call at all.

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

Completeness5/5

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

For a 3-parameter read tool with full schema coverage, existing output schema, and safety annotations, the description covers the remaining agent-relevant facts: prerequisite ordering, cost, and output granularity. Nothing needed to invoke it correctly is missing.

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 100% and each parameter carries its own description, so the description need only match that baseline. It confirms the selector/omit-for-full-text behavior but adds no syntax or format detail beyond the schema.

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

Purpose5/5

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

States a specific verb+resource ('pulling repeated elements ... from the page a session is on') with the two operating modes (CSS selector vs. full page text) spelled out. This clearly separates it from siblings like browser_snapshot (structure) or browser_screenshot (image).

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

Usage Guidelines5/5

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

Uses explicit 'Use for' / 'Don't use when' framing, and names the concrete prerequisite alternative: call browser_navigate first if the page isn't loaded. An agent knows both when to select this tool and what to do instead in the blocking case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources