Skip to main content
Glama

fetch

Read any URL as clean markdown, including HTML, JSON, XML, CSV, and PDF, with no domain restrictions. Send POST requests to APIs that require request bodies.

Instructions

Fetch any URL and return the page content as clean markdown. Handles HTML, JSON, XML, CSV, and PDF files. Use this tool for reading/fetching web pages - it has no domain restrictions. For discovering URLs via search, use the search tool. For reading URL content, use this tool.

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
rawNoReturn raw HTML instead of markdown (default: false)
urlYesThe URL to fetch
bodyNoRequest body (POST only). Content-Type defaults to application/json when the body is valid JSON.
methodNoHTTP method (default: GET). Use POST for search/listing APIs that only answer to POST (Getro, Algolia, GraphQL). POST requests skip site-specific handling and the response cache.
headersNoExtra request headers, e.g. {"Accept": "application/json"}. Connection and body-framing headers cannot be set.
timeoutNoRequest timeout in seconds (default: 10)
maxTokensNoMaximum tokens to return (default: 25000)
redditSortNoReddit threads only, optional (default: best, Reddit's own ranking). Comment order: best, top (highest score), new, old, controversial, or qa (comments the poster answered first, for AMAs). Same as ?sort= on the thread URL, and wins over it; load-more links keep it.
redditCommentsNoReddit threads only (default: fast). Reddit returns at most 200 comments per read; "fast" makes one read and links the rest. "more" follows those links automatically (top-level comments first, up to 5 extra reads, ~6s each) until maxTokens is full, so raise maxTokens and timeout (e.g. 60) with it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.8.11
    • addedInput schema / properties / redditComments
      Added value: +{
      +  "description": "Reddit threads only (default: fast). Reddit returns at most 200 comments per read; \"fast\" makes one read and links the rest. \"more\" follows those links automatically (top-level comments first, up to 5 extra reads, ~6s each) until maxTokens is full, so raise maxTokens and timeout (e.g. 60) with it.",
      +  "enum": [
      +    "fast",
      +    "more"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / redditSort
      Added value: +{
      +  "description": "Reddit threads only, optional (default: best, Reddit's own ranking). Comment order: best, top (highest score), new, old, controversial, or qa (comments the poster answered first, for AMAs). Same as ?sort= on the thread URL, and wins over it; load-more links keep it.",
      +  "enum": [
      +    "best",
      +    "top",
      +    "new",
      +    "old",
      +    "controversial",
      +    "qa"
      +  ],
      +  "type": "string"
      +}
  2. First observedv3.3.1

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden itself. It discloses the output format (clean markdown), supported input formats, and the absence of domain restrictions, but says nothing about auth requirements, rate limits, paywalls, JS rendering, or truncation behavior — and truncation is a real concern given maxTokens is a parameter. Much of the behavioral context lives in the schema rather than the description.

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 first two sentences are tight and front-loaded with the core behavior. The last two sentences are partly redundant — "Use this tool for reading/fetching web pages" and "For reading URL content, use this tool" restate the opening sentence rather than adding new information.

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

Completeness4/5

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

For a 9-parameter general-purpose fetch tool with no output schema and no annotations, the definition covers purpose, scope, formats, and routing to the search alternative. Gaps remain around response size/truncation behavior and the reddit-sibling relationship, but the exceptionally detailed schema compensates for most of that.

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 every parameter is already documented, including method, body, headers, timeout, maxTokens, and the two reddit options. The description adds no parameter-level meaning beyond what the schema states; it only implies that arbitrary URLs are acceptable. Baseline 3 is appropriate when the schema does the heavy lifting.

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 specific verb and resource ("Fetch any URL and return the page content as clean markdown") and enumerates supported content types (HTML, JSON, XML, CSV, PDF). It also declares scope ("no domain restrictions") and explicitly contrasts itself with the search tool, so an agent can distinguish it from the many search_* siblings 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 Guidelines4/5

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

Gives an explicit when-to-use rule ("Use this tool for reading/fetching web pages") and names the alternative for a different intent ("For discovering URLs via search, use the search tool"). It offers no guidance about the reddit-specific siblings (browse_reddit, search_reddit) that also appear in the tool list, even though fetch has reddit-specific parameters — that ambiguity is left unresolved.

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