Skip to main content
Glama

Agent Data Tools: Web, documents and search

Webpage to Markdown, clean text: any URL to clean text for LLMs

extract
Read-only

Fetch any public web page URL and get clean, LLM-ready text or Markdown: main content, code blocks, tables, links and headings, for RAG and agent context. Static HTML, Markdown or text; optional section ID. Default 20,000 output characters, max 100,000; input 2 MiB. No JavaScript rendering (see /extract/rendered), logins or paywalls. Empty pages, bad sections, browser challenges and errors are not charged. Use to read docs or articles. Example: url=https://example.com. Price $0.002/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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
urlYesAbsolute http(s) URL of the page to fetch
formatNoReturned representation: text (default), markdown, or both. HTML structured details are included in every format; Markdown/plain sources have empty details.
sectionNoOptional visible HTML ID within primary content, 1-500 characters. A leading # (the fragment a docs link shows) or a URL ending in #id is accepted, and so is a heading's visible text when exactly one heading matches (answered with warning section_matched_by_heading). Heading scope includes subsections until next same/higher-level heading; section/article/main/div scope is its subtree. Missing/ambiguous/unsupported targets fail uncharged, and a miss lists the ids the page does offer under sections. A fragment added to url still does not select a section. Leave it out to read the whole page.
maxCharsNoMaximum characters of body text to return (500-100000, default 20000)

Output Schema

NameRequiredDescriptionDefault
urlYes
langYes
textNo
linksYes
titleYes
formatYes
statusYes
tablesYes
sectionYesNull for full primary-content reading. Otherwise the explicitly requested scope; title/description/canonical remain page-level metadata. Heading scope ends before the next same/higher-level heading, including nested subsections; container scope is its subtree.
finalUrlYes
headingsYes
markdownNo
warningsYes
canonicalYes
fetchedAtYes
truncatedYesInput or requested primary representation is incomplete. Structured detail limits are reported separately in warnings.
codeBlocksYes
hashFormatYes
textLengthYesFull extracted text length before the character cap, within the input limit.
contentHashYes
contentTypeYes
descriptionYes
linkBaseUrlYesEffective source-derived HTTP(S) base for links: the first supported HTML base href outside inert/foreign subtrees, otherwise finalUrl. Credentials and non-HTTP(S) base values are ignored with a warning. HTML links/canonical use this base; raw Markdown keeps relative syntax and can be resolved using this field. No linked resource is fetched. This static interpretation does not evaluate scripts or Content Security Policy.
sourceFormatYesSource interpretation. Markdown is identified by text/markdown, or a .md/.markdown final path served as text/plain (warned). Markdown syntax is retained verbatim within the cap, not converted to HTML or parsed for structured details; text also retains that syntax. HTML section IDs are unsupported for Markdown/plain text.
sourceMetadataYesPage-level source declarations, not verified authorship or freshness. Head author/Open Graph date tags and bounded direct Schema.org JSON-LD Article/WebPage-like nodes only; exact-URL matches preferred, otherwise only one identity-free candidate. Author @id references resolve only to unambiguous local Person/Organization names, with both paths recorded. No external context/reference fetching or general JSON-LD expansion. Separate 2000-character value+provenance budget; 5 authors/10 dates. Original date strings are not normalized. Empty for Markdown/plain sources; unrelated entities and ambiguous nodes are omitted with warnings.
contentSelectionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / section / description
      Previous value: -"Optional exact visible HTML ID within primary content, 1-500 characters. Heading scope includes subsections until next same/higher-level heading; section/article/main/div scope is its subtree. Missing/ambiguous/unsupported targets fail uncharged. URL fragments alone do not select a section. Leave it out to read the whole page."New value: +"Optional visible HTML ID within primary content, 1-500 characters. A leading # (the fragment a docs link shows) or a URL ending in #id is accepted, and so is a heading's visible text when exactly one heading matches (answered with warning section_matched_by_heading). Heading scope includes subsections until next same/higher-level heading; section/article/main/div scope is its subtree. Missing/ambiguous/unsupported targets fail uncharged, and a miss lists the ids the page does offer under sections. A fragment added to url still does not select a section. Leave it out to read the whole page."
  2. Changed2 schema fields changed
    • changedInput schema / properties / maxChars / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / maxChars / minimum
      Previous value: --9007199254740991New value: +500
  3. Changed1 schema field changed
    • changedInput schema / properties / section / description
      Previous value: -"Optional exact visible HTML ID within primary content, 1-500 characters. Heading scope includes subsections until next same/higher-level heading; section/article/main/div scope is its subtree. Missing/ambiguous/unsupported targets fail uncharged. URL fragments alone do not select a section."New value: +"Optional exact visible HTML ID within primary content, 1-500 characters. Heading scope includes subsections until next same/higher-level heading; section/article/main/div scope is its subtree. Missing/ambiguous/unsupported targets fail uncharged. URL fragments alone do not select a section. Leave it out to read the whole page."
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/openWorldHint/destructiveHint=false and idempotentHint=false; the description adds value beyond them with output ceilings (20,000 default, 100,000 max), a 2 MiB input cap, pricing ($0.002/call, first 10 free, failures uncharged), and the non-obvious fact that repeats cost money because the call is billed rather than cached. The statement 'reads or computes only and changes nothing' is consistent with the read-only annotation rather than contradicting it.

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?

Front-loaded with purpose, capability and the JS-rendering exclusion; limits and pricing follow in a compact block. The commercial/pricing sentence is dense and runs long, but nearly every clause (free failures, per-call pricing, no caching) carries decision-relevant information.

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?

For a one-shot fetch/convert tool with an output schema present and rich annotations, the description covers the remaining unknowns an agent needs: JS limitations, auth/paywall boundaries, size caps, cost model and failure billing. Nothing material is missing for correct invocation.

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 url, format, section and maxChars are all documented in the schema itself; the description only restates the optional section ID and the char limits in compressed form. It adds no syntax or failure semantics beyond what the schema already spells out (e.g. section_matched_by_heading, uncharged misses). Baseline 3 applies when the schema carries the parameter burden.

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?

States a concrete verb and resource ('Fetch any public web page URL') plus the exact output artifact ('clean, LLM-ready text or Markdown') and enumerates what is preserved (main content, code blocks, tables, links, headings). It also explicitly distinguishes itself from the rendered sibling: 'No JavaScript rendering (see /extract/rendered)'.

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?

Gives positive guidance ('Use to read docs or articles'), explicit exclusions ('No JavaScript rendering ... logins or paywalls'), and routes the JS case to the named alternative /extract/rendered. It further states when a call is free (failed/empty pages) and includes a concrete invocation example.

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.

Resources