Skip to main content
Glama

extract

Pull structured data from web pages without AI by applying CSS or XPath schemas or built-in patterns for emails, phone numbers, URLs, money, percentages, dates, times, and postal codes.

Instructions

Pull data out of a page without AI: a CSS or XPath schema {"baseSelector", "fields": [...]}, or ready-made patterns (email, phone, url, money, percent, date, time, postal_code, ...).

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": {
      "url": "<url>"
    },
    "name": "extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
patternsNo
css_schemaNo
xpath_schemaNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/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 behavioral burden. It discloses that extraction is done without AI, but it does not explain authentication needs, rate limits, whether pages are rendered, how errors are handled, or what the return format looks like.

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?

The description is a single dense sentence with the core action front-loaded. It is efficient, though embedding a JSON-like schema snippet makes it slightly harder to parse quickly.

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

Completeness3/5

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

For a four-parameter extraction tool with no annotations and no output schema, the description covers the main mechanisms but leaves important context incomplete. It does not describe the return structure or explain how the schema and pattern parameters interact.

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 0%, so the description must compensate for undocumented parameters. It explains the css_schema shape and gives examples of ready-made patterns, which adds useful meaning beyond the schema, but it does not clarify whether patterns and schemas are alternatives or can be combined, nor does it fully describe xpath_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 states a specific verb and resource: pulling data out of a page using CSS/XPath schemas or ready-made patterns. It is clear what the tool does, but it does not explicitly distinguish itself from the sibling scrape tool.

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 by the mechanisms listed: use CSS/XPath schemas or predefined patterns for extraction. However, there is no explicit guidance on when to choose this over scrape, crawl, or other siblings, and no exclusions are stated.

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