Skip to main content
Glama
readfetch

@readfetch/mcp-x402-proxy

readfetch_section

Read-only

Extract a single heading or CSS selector from a public page instead of the full document, returning matched Markdown or text, metadata, and available headings when no match is found.

Instructions

Extract one heading or one CSS selector from a public page instead of the whole document. Returns matched Markdown or text, title, chars, content_sha256, and billed. If the heading is missing, returns HTTP 200 with empty text and available_headings so you can retry. mode: fast (plain HTTP) or render (default, Chromium when the page blocks HTTP). max_chars truncates output (default 8000, max 20000). Prefer readfetch_text for full articles; readfetch_scrape when content needs JavaScript.

Input Schema

NameRequiredDescriptionDefault
urlYesPublic page URL to extract from.
modeNofast = HTTP-first; render = one browser pass when plain HTTP fails (default).render
formatNoOutput flavour for the matched section (markdown default).markdown
headingNoCase-insensitive, whitespace-normalised.
selectorNoCSS selector; up to 20 matches concatenated.
max_charsNoTruncate matched text after this many characters.

Output Schema

NameRequiredDescriptionDefault
urlNo
hintNo
textNo
charsNo
titleNo
billedNo
statusNo
matchedNo
status_codeNo
used_browserNo
content_sha256No
available_headingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.13
    • addedInput schema / properties / format / description
      Added value: +"Output flavour for the matched section (markdown default)."
    • addedInput schema / properties / max_chars / description
      Added value: +"Truncate matched text after this many characters."
    • addedInput schema / properties / mode / description
      Added value: +"fast = HTTP-first; render = one browser pass when plain HTTP fails (default)."
    • addedInput schema / properties / url / description
      Added value: +"Public page URL to extract from."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "available_headings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "billed": {
      +      "type": "boolean"
      +    },
      +    "chars": {
      +      "type": "integer"
      +    },
      +    "content_sha256": {
      +      "type": "string"
      +    },
      +    "hint": {
      +      "type": "null"
      +    },
      +    "matched": {
      +      "properties": {
      +        "kind": {
      +          "type": "string"
      +        },
      +        "label": {
      +          "type": "string"
      +        },
      +        "level": {
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "status_code": {
      +      "type": "integer"
      +    },
      +    "text": {
      +      "type": "string"
      +    },
      +    "title": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "format": "uri",
      +      "type": "string"
      +    },
      +    "used_browser": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds substantial context beyond them: the returned fields (Markdown/text, title, chars, content_sha256, billed), the missing-heading case returning HTTP 200 with empty text and available_headings for retry, and the max_chars truncation and billing implication.

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?

Four dense sentences, all front-loaded with the core action and the retry/fallback behavior before the sibling routing. No sentence is filler.

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

Completeness5/5

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

With an output schema present and annotations covering safety, the description still covers the key edge cases (missing heading, blocked HTTP, truncation) so an agent can call and recover correctly without further context.

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 coverage is 100%, and the description still adds useful semantics for mode (Chromium fallback only on HTTP block), max_chars default/max, and the retry-oriented behavior of heading. Most parameter detail is duplicated from the schema, but the mode and truncation explanations add real value.

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 opening sentence states a specific verb (extract) and resource (one heading or one CSS selector) and explicitly contrasts it with the whole-document alternative. An agent can distinguish it from readfetch_text/readfetch_scrape without opening any schema.

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?

Explicitly routes the agent: 'Prefer readfetch_text for full articles; readfetch_scrape when content needs JavaScript.' It also gives the mode tradeoff (fast vs render default), so when-to-use is fully specified alongside the alternatives.

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