Skip to main content
Glama

agent-browser

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.

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 adds genuinely useful behavior: one string per matched element and the no-selector fallback to full page text. It stops short of noting large-page cost or truncation behavior, but nothing is misleading.

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?

Two tight sentences, scope first and exclusion second, with zero filler. Every clause carries actionable information.

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?

Output schema is present so return values need not be explained, and the prerequisite sequencing is covered. The only gap is the attribute-reading capability, which an agent would have to discover from the schema rather than the description.

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 description coverage is 100%, so the schema already documents selector, attribute and session_id with meaning. The description reinforces the selector/omission semantics but never mentions the attribute parameter or what omitting a selector does to the return shape across matched elements, so it adds little 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 (extract) and resource (repeated elements — prices, titles, links — or full page text) plus the mechanism (CSS selector). This clearly separates it from siblings like browser_snapshot and browser_screenshot, which capture rather than extract structured values.

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?

Explicitly framed as 'Use for:' and 'Don't use when:', naming the prerequisite failure and the exact alternative (call browser_navigate first). An agent knows both when to reach for it and what to do instead.

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