Skip to main content
Glama

Read a page as markdown

page_markdown
Read-onlyIdempotent

Convert any web page's main content to markdown, stripping navigation and footers. Fetch by URL or HTML, with options for page metadata and Wayback snapshots.

Instructions

Return a page's main content as markdown, without navigation or footer.

html_or_url: an http(s) URL to fetch, or the HTML itself. front_matter: open the markdown with a YAML block of what the page declares about itself (title, author, dates, url...) and each answer's source. at: a date: read the URL as the Wayback Machine captured it then. respect_tdm: answer tdm_reserved when the site reserves its text and data mining rights (TDMRep). offset: where in the markdown this answer starts, 0 for the beginning; the answer before gives the next as next_offset. max_chars: the most characters this answer carries, 1 to 60,000; fewer when more would weigh over 75,000 bytes, as 60,000 characters of Chinese do.

Returns {"ok", "markdown", "url", "length", "next_offset"}, and "fetch" for a URL: markdown is one slice, length the whole markdown's, next_offset where the next slice starts or null at the end. The markdown is always the page's own content: a failure is ok false with "error", never text that could be mistaken for the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNoa date: read the URL as the Wayback Machine captured it then.
offsetNowhere in the markdown this answer starts, 0 for the beginning; the answer before gives the next as next_offset.
max_charsNothe most characters this answer carries, 1 to 60,000; fewer when more would weigh over 75,000 bytes, as 60,000 characters of Chinese do.
html_or_urlYesan http(s) URL to fetch, or the HTML itself.
respect_tdmNoanswer tdm_reserved when the site reserves its text and data mining rights (TDMRep).
front_matterNoopen the markdown with a YAML block of what the page declares about itself (title, author, dates, url...) and each answer's source.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
urlNo
errorNo
fetchNo
lengthNo
markdownNo
next_offsetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.9.0
    • changedInput schema / properties / max_chars / description
      Previous value: -"how many characters this answer carries, 1 to 60,000."New value: +"the most characters this answer carries, 1 to 60,000; fewer when more would weigh over 75,000 bytes, as 60,000 characters of Chinese do."
    • changedOutput schema / $defs / ErrorDetail / description
      Previous value: -"Why a tool could not answer.\n\n``retryable`` is true only for ``fetch_failed``, and on a crawled page for\n``rate_limited``: the same call may work later. The others need something\nto change first -- an install, an input, or the caller's mind about a site\nthat said no."New value: +"Why a tool could not answer.\n\n``retryable`` is true only for ``fetch_failed``, and on a crawled page for\n``rate_limited``: the same call may work later. Not every ``fetch_failed``\nis: a redirect loop, or an encoding this install cannot read, would be\nmet again. The others need something to change first -- an install, an\ninput, or the caller's mind about a site that said no."
    • changedOutput schema / $defs / ErrorDetail / properties / code / enum
      Previous value: -[
      -  "missing_extra",
      -  "refused_by_robots",
      -  "refused_address",
      -  "fetch_failed",
      -  "too_large",
      -  "bad_input",
      -  "tdm_reserved"
      -]New value: +[
      +  "missing_extra",
      +  "refused_by_robots",
      +  "refused_by_site",
      +  "payment_required",
      +  "refused_address",
      +  "fetch_failed",
      +  "too_large",
      +  "bad_input",
      +  "tdm_reserved"
      +]
  2. Changed8 schema fields changedv0.7.0
    • addedInput schema / properties / at / description
      Added value: +"a date: read the URL as the Wayback Machine captured it then."
    • addedInput schema / properties / front_matter / description
      Added value: +"open the markdown with a YAML block of what the page declares about itself (title, author, dates, url...) and each answer's source."
    • addedInput schema / properties / html_or_url / description
      Added value: +"an http(s) URL to fetch, or the HTML itself."
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "default": 30000,
      +  "description": "how many characters this answer carries, 1 to 60,000.",
      +  "title": "Max Chars",
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "where in the markdown this answer starts, 0 for the beginning; the answer before gives the next as next_offset.",
      +  "title": "Offset",
      +  "type": "integer"
      +}
    • addedInput schema / properties / respect_tdm / description
      Added value: +"answer tdm_reserved when the site reserves its text and data mining rights (TDMRep)."
    • addedOutput schema / properties / length
      Added value: +{
      +  "title": "Length",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / next_offset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Next Offset"
      +}
  3. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, etc.), the description discloses return format, pagination via offset/next_offset, max_chars byte-weight limits, TDMRep behavior, Wayback Machine use with 'at', and a strong failure guarantee ('never text that could be mistaken for the page'). This substantially exceeds what annotations provide.

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?

The purpose is front-loaded, but the parameter list largely repeats the schema descriptions verbatim, introducing redundancy. The return-format explanation is valuable, but the duplicated parameter block makes the description longer than necessary.

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 tool with 6 parameters and complex behavior (slicing, pagination, TDM, Wayback), the description covers invocation details, error behavior, and return values. An agent has everything needed to call it correctly without guessing.

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%, and the description's parameter explanations are near-identical to the schema's property descriptions. It adds no new semantic meaning beyond what the schema already communicates, so the baseline of 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 opens with a precise verb and resource: 'Return a page's main content as markdown, without navigation or footer.' This clearly distinguishes it from siblings like fetch_page (likely raw content) or extraction tools. The scope ('main content') and format ('markdown') are explicit.

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

Usage Guidelines3/5

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

The description implies usage ('read a page as markdown') but provides no explicit guidance on when to choose this tool over alternatives, no exclusions, and no mention of sibling tools. An agent can infer when it is appropriate, but it is not stated.

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