Skip to main content
Glama

Web Extract

web_extract
Read-only

Scrapes structured data from the current page. Pass selectors = an object mapping field names to CSS selectors (e.g. {"title":"h1","price":".price"}); returns each field's first match: its text, or for a link (an element with href) an object {text, href} with the absolute address; null when absent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoSession name (default 'default').
selectorsYesField name → CSS selector map.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
dataNoOne key per requested field: the first match's text, {text, href} for a link, null when absent.
titleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / data / description
      Previous value: -"One key per requested field; first-match text/href, null when absent."New value: +"One key per requested field: the first match's text, {text, href} for a link, null when absent."
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "description": "One key per requested field; first-match text/href, null when absent.",
      +      "type": "object"
      +    },
      +    "title": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=true), so the description's job is lighter. It adds real behavioral detail beyond the annotations by describing the return contract: first match per selector, text vs {text, href} for links, absolute href resolution, and null when a selector is absent.

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?

Purpose is front-loaded in the first sentence, and the second sentence packs the parameter format and return contract into one efficient clause. It is dense but every clause carries information; no filler text.

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 read-only extraction tool with an output schema and full annotation coverage, the description supplies everything needed to call it correctly: the selector map format, the shape of results, and the null case. Missing only explicit guidance on prerequisites (e.g. an open page/session) and sibling routing, but those are minor against the structured data already provided.

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 description coverage is 100%, so the baseline is 3. The description exceeds that by explaining what the `selectors` object means in practice, including a concrete example ({"title":"h1","price":".price"}) and the per-field result semantics; the `session` parameter is left entirely to the schema.

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 gives a specific verb+resource ('Scrapes structured data from the current page') and even specifies the extraction mechanism (CSS selectors), which implicitly separates it from siblings like web_read and web_eval. However, it never names or contrasts those siblings explicitly, so it stops short of full differentiation.

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 only implied: 'from the current page' hints that a page must already be loaded, and the selectors requirement implies when the tool is appropriate. There is no explicit when-to-use / when-not guidance and no pointer to alternatives such as web_read or web_eval for non-structured extraction.

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