Skip to main content
Glama

Agent Data Tools: Documents to text

Scrape website page to Markdown: page URL into clean Markdown or 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 25 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 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.
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. 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 and destructiveHint=false, and the description goes well beyond them: 20,000 default / 100,000 max output characters, 2 MiB input cap, no JS rendering, no auth/paywall support, and a billing model where empty pages, bad sections, browser challenges and errors are uncharged. The note that "each call is charged, so repeats are not free" is consistent with idempotentHint=false 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 and output shape, with the no-JS/alternative caveat early where it matters. The weakness is redundant billing copy appearing three times ("Empty pages... not charged", "failed calls free", "each call is charged, so repeats are not free"), which could be collapsed into one clause.

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 four-parameter scraping tool with a full output schema, annotations, and complete param coverage, nothing an agent needs is missing: input limits, output limits, failure/free semantics, unsupported content types, and the rendered-page alternative are all present.

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 url, format, section and maxChars thoroughly, including enum values and the section scoping rules. The description only restates "optional section ID" and the default/max character budget, adding little beyond what the structured fields already say; baseline 3 applies.

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 leads with a specific verb and resource ("Fetch any public web page URL") and the concrete output form ("clean, LLM-ready text or Markdown: main content, code blocks, tables, links and headings"). It also scopes itself against a sibling by naming the JS-rendering variant (/extract/rendered), so an agent can place it without opening the 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?

It states when to use it ("Use to read docs or articles"), the boundary condition ("Static HTML, Markdown or text"; "No JavaScript rendering"), the explicit alternative for that boundary ("see /extract/rendered"), and the unsupported cases ("logins or paywalls"). That covers when, when-not, and alternatives.

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.