Skip to main content
Glama

Fetch URL As Served

url_fetch

Fetches one public URL exactly as served — any content type, binary included — and returns status, final_url, redirects, response_headers, content_type, content_length, last_modified, etag and a bounded prefix of the body (max_bytes, default 65536, at most 1048576; truncated says the body continues). This is the tool for validating data feeds and files (XML, JSON, CSV, XMLTV .xml.gz) that web_scrape cannot read: a body that is itself a gzip file is detected (gzip true); valid files return a decompressed prefix with decompressed_bytes counting the stream. If decoding fails, gzip_error says the body contains compressed bytes instead. Text bodies return as UTF-8 (body_encoding utf8), binary as base64. head true sends HEAD and returns headers only. An HTTP error status is an answer, returned with its status and headers. Credits: 1 per fetch whose server answered (the page-read price); a fetch that never reached a server is not charged. This tool runs synchronously. When retention succeeds, retained.run_id reads the completed answer again for free with scraper_run_get; retained.available false says why it could not be kept. Saved synchronous results can be evicted early when storage is needed. The same idempotency_key never charges twice during its replay window.

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

Input Schema

NameRequiredDescriptionDefault
urlYesPublic http or https URL to fetch
headNoSend HEAD and return headers only, no body
max_bytesNoBody bytes to return at most (1-1048576)
verbosityNoconcise: short summary of the answer; full: the whole answer. Only shapes the output. Send idempotency_key to read the other form later without a new charge.
idempotency_keyNoOptional retry key bound to this customer and these arguments. Matching retries replay the first result and do not reserve a second credit; the replay says so in billing (replayed true, credits_charged_this_call 0, original_credits_used).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations say almost nothing (readOnlyHint false, openWorldHint true, destructiveHint false), so the description carries the load and mostly does: it discloses 1-credit-per-answered-fetch billing, that errors are returned as answers, gzip detection/decompression behavior, UTF-8 vs base64 encoding rules, synchronous execution, retention/eviction caveats, and idempotency replay. It never says whether it follows redirects beyond reporting them, and the interaction between idempotentHint=false and the idempotency_key is left implicit, so it stops short of 5.

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 the core purpose and output fields, then moves to differentiators, encoding rules, errors, billing, retention, and idempotency in a sensible order. It is dense and long for a fetch tool — the retention/eviction and replay clauses could be trimmed or pushed into schema field docs — but almost every sentence carries operative information.

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?

There is no output schema, so the description must name the return fields, and it does comprehensively (status, final_url, redirects, response_headers, content_type, content_length, last_modified, etag, bounded body, gzip/decompressed_bytes/gzip_error, body_encoding, retained.run_id). Cost, failure, and truncation semantics are all covered for a 5-parameter tool.

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 already 100%, so the baseline is 3; the description still adds meaning by tying max_bytes to truncation ('truncated says the body continues'), tying head to a headers-only answer, and clarifying that verbosity only shapes output while idempotency_key lets you read the other form without a new charge. Those are cross-parameter interactions the schema does not encode.

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+resource and scope: 'Fetches one public URL exactly as served — any content type, binary included' and enumerates exactly what comes back (status, final_url, redirects, headers, bounded body prefix). It explicitly carves out its niche against the named sibling web_scrape ('feeds and files ... that web_scrape cannot read'), so an agent can discriminate without opening schemas.

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?

States the selection rule explicitly: use this for validating XML/JSON/CSV/XMLTV feeds that web_scrape cannot read. Also gives mode guidance ('head true sends HEAD and returns headers only'), and routes follow-up reads to scraper_run_get. Alternatives and when-not language are both present.

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.

Resources