Skip to main content
Glama

Fetch a web page as Markdown

fetch
Read-only

Retrieve Japanese web pages as low-impact, token-efficient Markdown with robots.txt compliance, rate limiting, and caching; choose Markdown, outline, screenshot, or auto quality mode.

Instructions

Fetch a web page (Japanese-web-native) as low-impact, token-efficient Markdown. Built-in robots.txt compliance, rate limiting, and caching. mode: auto (default; quality score picks Markdown or screenshot) / markdown / outline (heading summary) / screenshot. Page 1 can come back as cache: unchanged or cache: diff (changed sections only, each without its child sections) instead of the body, but only when all of these hold: this server process has already returned that URL's Markdown body, amenbo's cached copy has expired (15 min by default; a refetch within 15 min, or a site that answers 304, returns the full text), the site resent the whole page, and the call has no selector and no force_full. The comparison copy may have been stored by another session or the CLI. Both responses carry total_tokens (the size of a full refetch) and a hint: if you have not read the whole content yourself, refetch with force_full: true. The CLI never returns them. The response also lists markdown_alternate: and llms_txt: when the page advertises them (amenbo does not fetch them itself). PDF URLs are handled automatically; other non-HTML responses (CSV, JSON, text/markdown, etc.) return a handoff with metadata, a text preview (paginated by page) and a curl command for the whole file. mode: screenshot is the retry for pages whose Markdown came back poor; when the layout itself is the information or you need viewport/scale control, use the screenshot tool instead.

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": "fetch"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesTarget URL (http/https only; PDF supported)
modeNoDefault: auto
pageNoPage number (default 1)
sectionNoSection ID obtained from outline mode; returns only that section's Markdown (`s0` is the content before the first heading listed in the outline, when there is any). IDs are assigned by heading position, so pass the same selector and force_full as the outline call
selectorNoCSS selector to narrow the content
force_fullNoDefault false. If true, disables diff responses (unchanged/diff) and boilerplate-block removal (pagination by max_tokens still applies). Set it when you got unchanged/diff but have not read the whole content yourself
max_tokensNoApproximate token budget per page (default 8000)
ask_robots_overrideNoSet true only when the user explicitly asked to fetch this page even though robots.txt denies it. amenbo then asks the user to confirm in the client UI and fetches only if they approve; this flag alone never bypasses robots.txt

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • changedInput schema / properties / force_full / description
      Previous value: -"Default false. If true, disables diff responses (unchanged/diff) and boilerplate-block removal (pagination by max_tokens still applies)"New value: +"Default false. If true, disables diff responses (unchanged/diff) and boilerplate-block removal (pagination by max_tokens still applies). Set it when you got unchanged/diff but have not read the whole content yourself"
    • changedInput schema / properties / section / description
      Previous value: -"Section ID obtained from outline mode; returns only that section's Markdown"New value: +"Section ID obtained from outline mode; returns only that section's Markdown (`s0` is the content before the first heading listed in the outline, when there is any). IDs are assigned by heading position, so pass the same selector and force_full as the outline call"
  2. Changed1 schema field changedv0.7.0
    • addedInput schema / properties / ask_robots_override
      Added value: +{
      +  "description": "Set true only when the user explicitly asked to fetch this page even though robots.txt denies it. amenbo then asks the user to confirm in the client UI and fetches only if they approve; this flag alone never bypasses robots.txt",
      +  "type": "boolean"
      +}
  3. Changed2 schema fields changedv0.6.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / force_full / description
      Previous value: -"Default false. If true, disables diff responses (unchanged/diff) and boilerplate-block removal, always returning the full content"New value: +"Default false. If true, disables diff responses (unchanged/diff) and boilerplate-block removal (pagination by max_tokens still applies)"
  4. Changed7 schema fields changedv0.1.5
    • changedInput schema / properties / force_full / description
      Previous value: -"既定false。trueで差分応答(unchanged/diff)と定型ブロック除去を無効化し常に全文を返す"New value: +"Default false. If true, disables diff responses (unchanged/diff) and boilerplate-block removal, always returning the full content"
    • changedInput schema / properties / max_tokens / description
      Previous value: -"1ページの概算トークン上限(既定8000)"New value: +"Approximate token budget per page (default 8000)"
    • changedInput schema / properties / mode / description
      Previous value: -"既定auto"New value: +"Default: auto"
    • changedInput schema / properties / page / description
      Previous value: -"ページ番号(既定1)"New value: +"Page number (default 1)"
    • changedInput schema / properties / section / description
      Previous value: -"outlineで得たsection ID。指定時はその節のMarkdownのみ返す"New value: +"Section ID obtained from outline mode; returns only that section's Markdown"
    • changedInput schema / properties / selector / description
      Previous value: -"本文を絞り込むCSSセレクタ"New value: +"CSS selector to narrow the content"
    • changedInput schema / properties / url / description
      Previous value: -"取得対象URL(http/httpsのみ。PDFも可)"New value: +"Target URL (http/https only; PDF supported)"
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only cover readOnly/openWorld, and the description goes well beyond them: robots.txt compliance, rate limiting, caching, the exact four conditions under which cache: unchanged/diff is returned instead of the body, the 15-minute expiry and 304 behavior, and the CLI exception. It also discloses non-HTML and PDF handling and what metadata accompanies a handoff response.

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, and nearly every sentence carries information. However, it is one dense paragraph with a long four-condition clause that is hard to scan, and the unexplained "(Japanese-web-native)" aside costs tokens without adding meaning.

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 an 8-parameter tool with no output schema, the description covers the return surface (total_tokens, hint, markdown_alternate, llms_txt, handoff metadata/preview/curl) and the tricky cache-vs-body branching that an agent must anticipate. Nothing needed to call it correctly or interpret the response appears to be missing.

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%, so baseline is 3, but the description adds real meaning: mode's auto behavior is explained (a quality score chooses Markdown or screenshot), force_full's effect is tied to the diff/unchanged cases, and ask_robots_override's confirm-in-UI flow is spelled out. It does not elaborate on `section` or `max_tokens` beyond the schema, so not a full 5.

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?

Opens with a specific verb and resource ("Fetch a web page ... as ... Markdown") and immediately scopes the output format. It also explicitly names the sibling it is not ("when ... you need viewport/scale control, use the `screenshot` tool instead"), so an agent can route between fetch and screenshot without opening either 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?

Gives explicit when-to-use guidance for each mode (auto vs markdown vs outline vs screenshot), states that screenshot mode is the retry path for poor Markdown, and names the alternative tool for layout/viewport cases. It also specifies when to refetch with force_full and when ask_robots_override is legitimate (only on explicit user request), with the exclusion that the flag alone never bypasses robots.txt.

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

Deploy Server

Other Tools