Skip to main content
Glama

Extract structured data from a web page

web_extract_run
Read-only

Extract structured fields from a web page using a CSS selector schema. Accepts a URL and CSS schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoWeb page URL to fetch.
linkNoAlias for `url`. Prefer `url`.
pathNoAlias for `url`. Prefer `url`.
trimNoIgnored if this tool does not support it.
limitNoIgnored if this tool does not support it.
offsetNoIgnored if this tool does not support it.
schemaYesCrawl4AI JsonCssExtractionStrategy schema: baseSelector plus fields.
contextYesDescribe the user's underlying goal in one sentence — not the tool you are calling.
tweetIdNoAlias for `url`. Prefer `url`.
waitForNoWait for a CSS selector before extraction. Must be prefixed with "css:" (e.g. css:main). JavaScript wait conditions are not supported.
pageSizeNoIgnored if this tool does not support it.
tweetUrlNoAlias for `url`. Prefer `url`.
tweet_idNoAlias for `url`. Prefer `url`.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
permalinkNoAlias for `url`. Prefer `url`.
tweet_urlNoAlias for `url`. Prefer `url`.
maxResultsNoIgnored if this tool does not support it.
max_resultsNoIgnored if this tool does not support it.
scanFullPageNoWhen true, scroll the page to load dynamically appended content.
conversation_idNoEcho the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / link / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  }
      +]
    • removedInput schema / properties / link / type
      Removed value: -"string"
    • addedInput schema / properties / maxResults
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / max_results
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / pageSize
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Alias for `url`. Prefer `url`."
      +}
    • addedInput schema / properties / permalink / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  }
      +]
    • removedInput schema / properties / permalink / type
      Removed value: -"string"
    • addedInput schema / properties / trim
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / tweetId / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  }
      +]
    • removedInput schema / properties / tweetId / type
      Removed value: -"string"
    • addedInput schema / properties / tweetUrl / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  }
      +]
    • removedInput schema / properties / tweetUrl / type
      Removed value: -"string"
    • addedInput schema / properties / tweet_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  }
      +]
    • removedInput schema / properties / tweet_id / type
      Removed value: -"string"
    • addedInput schema / properties / tweet_url / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  }
      +]
    • removedInput schema / properties / tweet_url / type
      Removed value: -"string"
  2. Changed7 schema fields changed
    • addedInput schema / properties / link
      Added value: +{
      +  "description": "Alias for `url`. Prefer `url`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / permalink
      Added value: +{
      +  "description": "Alias for `url`. Prefer `url`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tweetId
      Added value: +{
      +  "description": "Alias for `url`. Prefer `url`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tweetUrl
      Added value: +{
      +  "description": "Alias for `url`. Prefer `url`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tweet_id
      Added value: +{
      +  "description": "Alias for `url`. Prefer `url`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tweet_url
      Added value: +{
      +  "description": "Alias for `url`. Prefer `url`.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "url",
      -  "schema",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "schema",
      +  "context",
      +  "llm_model"
      +]
  3. Changed5 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Describe the user's underlying goal in one sentence — not the tool you are calling.",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "url",
      -  "schema"
      -]New value: +[
      +  "url",
      +  "schema",
      +  "context",
      +  "llm_model"
      +]
  4. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  5. Added

TDQS

B3/5.0
Behavior2/5

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

The description adds no behavioral details beyond the readOnlyHint and openWorldHint annotations; it does not mention return format, rendering behavior, or side effects. With annotations covering the safety profile, the description still fails to add context like 'returns JSON matching the schema' or 'requires CSS selectors to exist on the page'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with a clear purpose statement, but the second sentence largely restates the title and schema, not earning its place. The description is appropriately short but contains slight redundancy.

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

Completeness2/5

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

Given 20 parameters, a nested schema, and no output schema, the two-sentence description is insufficient. It omits guidance on how to construct the CSS schema, what `context` is for, and what the return shape looks like, leaving an agent to rely entirely on the schema descriptions.

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 baseline is 3; the description's mention of 'URL and CSS schema' adds little beyond the schema. It does not clarify the required `context` and `llm_model` parameters, and its emphasis on URL might mislead since url is not actually required.

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 ('Extract'), resource ('web page'), and mechanism ('CSS selector schema'), which clearly distinguishes it from sibling tools like web_crawl_run and web_ask_run. An agent can immediately tell this tool is for structured field extraction, not crawling or searching.

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

Usage Guidelines2/5

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

No guidance is given on when to choose this tool over siblings such as web_crawl_run, web_ask_run, or web_search_run, nor are prerequisites or exclusions mentioned. The only hint is that it accepts a URL and CSS schema, implying usage for structured extraction, but no explicit alternatives or conditions are provided.

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.