Skip to main content
Glama

generate_parser

Read-only

Look at a page ONCE with an LLM and get back CSS selectors that extract the fields you asked for. Pass the returned parser as the extract argument on every later scrape of that same layout and no AI runs again — it becomes a plain, free, deterministic extraction. Use this instead of ai_prompt whenever you will scrape more than a couple of pages of the same shape. Every selector is run against the page before being returned, so report/coverage tell you which fields are actually reliable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoThe page to learn the layout from
htmlNoMarkup you already have, instead of fetching a URL (no proxy bandwidth used)
fieldsNoWhat to extract, as { field_name: "plain-English description" } — e.g. { "price": "the product price", "specs": "every spec bullet, as a list" }. Max 25.
promptNoFree-text alternative to `fields` — the model picks and names the fields itself
renderNoLearn from the browser-rendered DOM instead of the raw HTML (needed for SPA pages)
countryNoISO country code for the proxy exit

Schema Changelog

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

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description adds valuable behavioral context: the LLM runs only once, later extraction is deterministic and free, selectors are validated against the page before being returned, and report/coverage indicate field reliability. No contradiction with annotations.

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?

Three sentences, each earning its place: how it works, when to use it, and what reliability signals to expect. The core action is front-loaded, and there is no fluff or repetition of schema details.

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 tool with no output schema, the description explains what is returned (CSS selectors), how to use it, and how to judge reliability via report/coverage. It could describe the report/coverage value shapes more precisely, but the essential invocation information is present and well integrated with the schema.

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 all six parameters thoroughly. The description adds general context about the returned parser being used as an `extract` argument, but it does not need to add parameter-level semantics; baseline 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 description states a specific verb and resource ('Look at a page ONCE with an LLM and get back CSS selectors') and explains the tool's output and lifecycle. It also distinguishes it from ai_prompt by describing when each is appropriate, so an agent can separate it from the alternative without opening schemas.

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?

Provides explicit when-to-use guidance: 'Use this instead of ai_prompt whenever you will scrape more than a couple of pages of the same shape.' It also implies the exclusion case (one-off scrapes) and tells the agent how to use the result on later scrapes via the `extract` argument.

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.1/5.0
Disambiguation5/5

Each tool targets a distinct resource or action: single scrape, batch scrape, crawl, search, dataset creation, parser lifecycle, proxy management, and SEO audit. Even the five status pollers are clearly differentiated by job type and their descriptions explicitly state which job they poll, so an agent can reliably select the right tool.

Naming Consistency4/5

Most names follow a verb-first pattern (create_dataset, generate_parser, run_collector, save_parser_preset, whitelist_ip) and listing tools consistently use the 'list_' prefix. However, a few are noun-first (parser_preset_stats, proxy_locations, collector_run_status) and the status polling tool for collectors breaks the otherwise consistent '<job>_status' convention ('collector_run_status' instead of 'run_collector_status').

Tool Count3/5

At 25 tools, the set is at the upper edge of the 'heavy' range. The tools all serve distinct functions, reflecting a broad platform covering scraping, crawling, search, datasets, parsers, proxies, and SEO, but the count borders on overwhelming for an agent, and some consolidation (e.g., a generic async job status endpoint) could reduce the surface.

Completeness4/5

The tool surface covers the core data-extraction lifecycle well: discovery (map, search), acquisition (scrape, batch, crawl), structured extraction (generate_parser, save_parser_preset, parser stats/heal), proxy management, and result aggregation (datasets, collectors). Notable gaps are the absence of any cancellation/abort mechanism for long-running async jobs and no way to delete a parser preset, but these are minor for most workflows.