Skip to main content
Glama

Extract structured field values from a webpage via CSS selectors

extract_fields

For each entry in fields, returns the trimmed text content of the first element matching that CSS selector. Costs $0.010 USDC on Solana via x402, per call — same price as GET /api/v1/extract.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe public HTTP/HTTPS URL to extract fields from
fieldsYesMap of field name to CSS selector, e.g. {"title": "h1", "price": ".price"} (max 25 fields)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
fieldsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses key behaviors: it returns only the first element matching each selector, trims text content, and costs $0.010 USDC per call via x402. This adds meaningful context beyond the schema, though it does not specify behavior when no element matches.

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?

The description is extremely concise: one sentence for the core behavior and one for pricing. Every word adds value, and the key information is front-loaded.

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?

The description covers the essential behavior and cost, and the output schema exists to detail returns. It lacks explicit notes on edge cases (e.g., missing selectors, redirects), but these are not critical for correct invocation. Overall, it is well-rounded.

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?

The schema already provides full descriptions for both parameters, including an example for the fields object and max 25 fields limit. The description adds no additional parameter-level detail beyond the schema, so a baseline score of 3 is appropriate.

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?

The title and description clearly identify the tool as extracting structured field values from a webpage using CSS selectors. It distinguishes itself from sibling tools (links, metadata, full scrapes) by focusing on specific field extraction with custom selectors.

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

Usage Guidelines4/5

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

The description provides clear context: it takes a map of field names to CSS selectors and returns trimmed text for first matches. However, it does not explicitly mention alternative tools or when to prefer this over links_url/metadata_url/scrape_url, so it lacks explicit exclusion guidance.

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.

TDQS

A4/5.0
Disambiguation5/5

Each tool targets a distinct extraction goal: specific fields, links, metadata, or full-page markdown. No overlap in purpose, so an agent can confidently select the right tool.

Naming Consistency3/5

Naming mixes verb_noun (extract_fields, scrape_url) and noun_url (links_url, metadata_url) patterns. The _url suffix on three tools gives some cohesion, but the inconsistency is noticeable.

Tool Count4/5

Four tools is a compact, focused set for a scraping server. It covers the essential extraction tasks without unnecessary bloat, though a few more specialized tools could be added.

Completeness4/5

The toolkit covers the core scraping workflow: full content, metadata, links, and targeted field extraction. Missing features like raw HTML or DOM handling are minor gaps, but most typical use cases are addressed.

Resources