Skip to main content
Glama

Fetch URL

fetch
Read-onlyIdempotent

Retrieve any public or authenticated URL as readable Markdown with source, timestamp, and content hash. Handles GitHub, Wikipedia, YouTube, PDFs, arXiv, and tweets, with tiered fallbacks and pagination.

Instructions

Fetch a public or authenticated URL as readable Markdown, with source, retrieval time, content hash and completeness. Specialized handlers support GitHub, Wikipedia, YouTube transcripts, PDFs, arXiv and tweets. Otherwise checks fresh shared content, then native Markdown/direct HTML, hosted rendering, and labeled archive fallbacks. Authenticated requests use direct sources only. Paginate long pages with startIndex and maxLength. noCache forces retrieval and disables archives unless explicitly allowed.

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
urlYesThe URL to fetch
maxTierNoStop at this tier (1-5, default 5). Lower = faster but fewer fallbacks.
noCacheNoSkip session and shared caches and fetch live content
maxLengthNoMaximum characters to return (default 50000)
timeoutMsNoOverall retrieval deadline in milliseconds, including downloads (default 25000)
startIndexNoCharacter offset to start from, for paginating long content (default 0)
allowArchiveNoAllow labeled historical snapshots after live retrieval fails; disabled by noCache unless explicitly enabled
maxAgeSecondsNoOldest acceptable cached retrieval in seconds; 0 forces retrieval (default 3600)

Output Schema

NameRequiredDescriptionDefault
urlYes
bytesNoImage size in bytes, when an image was returned
titleNo
sourceYes
timingYes
qualityYes
mimeTypeNoSet when the URL is an image returned as an image block
truncatedYes
archivedAtNo
sourceKindNo
verifiedAtNo
contentHashNo
retrievedAtNo
canonicalUrlNo
completenessNo
contentLengthYesFull length of the fetched content in characters
nextStartIndexNoPass as startIndex to fetch the next chunk
returnedLengthYes
cacheAgeSecondsNoAge of the content when served from the shared cache

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv6.0.0
    • addedInput schema / properties / allowArchive
      Added value: +{
      +  "description": "Allow labeled historical snapshots after live retrieval fails; disabled by noCache unless explicitly enabled",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / maxAgeSeconds
      Added value: +{
      +  "description": "Oldest acceptable cached retrieval in seconds; 0 forces retrieval (default 3600)",
      +  "maximum": 2592000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / maxLength
      Added value: +{
      +  "description": "Maximum characters to return (default 50000)",
      +  "maximum": 1000000,
      +  "minimum": 100,
      +  "type": "integer"
      +}
    • addedInput schema / properties / noCache
      Added value: +{
      +  "description": "Skip session and shared caches and fetch live content",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / startIndex
      Added value: +{
      +  "description": "Character offset to start from, for paginating long content (default 0)",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / timeoutMs
      Added value: +{
      +  "description": "Overall retrieval deadline in milliseconds, including downloads (default 25000)",
      +  "maximum": 120000,
      +  "minimum": 500,
      +  "type": "integer"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "archivedAt": {
      +      "type": "string"
      +    },
      +    "bytes": {
      +      "description": "Image size in bytes, when an image was returned",
      +      "type": "number"
      +    },
      +    "cacheAgeSeconds": {
      +      "description": "Age of the content when served from the shared cache",
      +      "type": "number"
      +    },
      +    "canonicalUrl": {
      +      "type": "string"
      +    },
      +    "completeness": {
      +      "enum": [
      +        "complete",
      +        "partial",
      +        "unavailable"
      +      ],
      +      "type": "string"
      +    },
      +    "contentHash": {
      +      "type": "string"
      +    },
      +    "contentLength": {
      +      "description": "Full length of the fetched content in characters",
      +      "type": "number"
      +    },
      +    "mimeType": {
      +      "description": "Set when the URL is an image returned as an image block",
      +      "type": "string"
      +    },
      +    "nextStartIndex": {
      +      "description": "Pass as startIndex to fetch the next chunk",
      +      "type": "number"
      +    },
      +    "quality": {
      +      "type": "number"
      +    },
      +    "retrievedAt": {
      +      "type": "string"
      +    },
      +    "returnedLength": {
      +      "type": "number"
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "sourceKind": {
      +      "enum": [
      +        "live",
      +        "archive",
      +        "metadata",
      +        "image"
      +      ],
      +      "type": "string"
      +    },
      +    "timing": {
      +      "type": "number"
      +    },
      +    "title": {
      +      "type": "string"
      +    },
      +    "truncated": {
      +      "type": "boolean"
      +    },
      +    "url": {
      +      "type": "string"
      +    },
      +    "verifiedAt": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "url",
      +    "source",
      +    "quality",
      +    "timing",
      +    "contentLength",
      +    "returnedLength",
      +    "truncated"
      +  ],
      +  "type": "object"
      +}
  2. Addedv1.0.2

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent, non-destructive, open-world), the description discloses the real behavioral story: a tiered retrieval ladder (shared cache, native Markdown/direct HTML, hosted rendering, labeled archive fallbacks) and the fact that authenticated requests bypass fallback sources and caches. That is valuable, non-obvious context an agent cannot get from annotations or schema; it only lacks detail on failure signaling.

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?

Dense but front-loaded: capability and return shape first, then handler coverage, then the fallback ladder, then operational knobs. Nearly every sentence carries information, though the tier/fallback sentence is compressed enough to require a second read.

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?

With 8 parameters, full schema coverage, and an output schema that already documents return values, the description covers everything else an agent needs: what it retrieves, in what form, what fallbacks occur, how authentication changes behavior, and how to page through large results. 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description genuinely adds meaning: it explains the tier ladder that maxTier caps and describes the intended use of startIndex/maxLength for paginating long content, plus the interaction between noCache and archive fallbacks. This makes the truncation and caching controls understandable as a system rather than as isolated fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb (fetch), resource (public or authenticated URL) and concrete output shape (readable Markdown plus source, retrieval time, hash, completeness), and names the special-cased hosts (GitHub, Wikipedia, YouTube, PDFs, arXiv, tweets). It never names or distinguishes itself from the siblings extract, fetch_batch, research or search, so an agent gets no explicit routing signal between them.

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?

Operational guidance is present: paginate long pages with startIndex and maxLength, noCache forces retrieval and disables archives unless allowed, and authenticated requests are restricted to direct sources. However there is no when-to-use-this-vs-alternative guidance, so the agent must infer that batch fetching belongs to fetch_batch and structured extraction to extract.

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