Skip to main content
Glama

Fetch URL

fetch_url
Read-only

Retrieves a web page via HTTP GET and returns its status, headers, and text body. Use it to read content from allowlisted hosts, with optional byte limits and no binary payloads.

Instructions

Fetch a URL with HTTP GET and return the status, headers and text body.

Only hosts on the server's allowlist can be reached, including for redirects. Binary bodies are not returned, only their size.

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_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute http(s) URL on an allowed host.
max_bytesNoTruncate the body after this many bytes (capped by server).

Output Schema

NameRequiredDescriptionDefault
urlYesFinal URL after redirects.
textYesDecoded body for textual content types, else null.
headersYes
truncatedYesTrue if the body was cut off at the size limit.
bytes_readYes
status_codeYes
content_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the description's job is the operational detail, and it delivers: the host allowlist applies to redirects too, and binary bodies return size only. These are non-obvious failure modes an agent would otherwise discover by trial. Missing are rate limits, auth requirements, and timeout behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the operation and return shape, followed by the two constraints that matter. Nothing is repeated from the schema and no sentence is filler.

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?

An output schema exists, so the description is not obligated to explain return values, yet it briefly does, which helps. For a two-parameter read-only tool the allowlist/redirect/binary coverage is nearly sufficient; only auth and rate-limit context is absent.

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 coverage is 100%, so both parameters (url, max_bytes) are already fully documented, including the server-side cap on truncation. The description adds only marginal meaning beyond that, restating the body-handling rule without explaining format or precedence for max_bytes. Baseline 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 names a specific verb and resource ('Fetch a URL with HTTP GET') and states exactly what comes back: status, headers and text body. That return summary alone distinguishes it from every sibling (read_file, search_files, sqlite_query), none of which reach the network.

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?

Usage is implied rather than stated: the allowlist and binary-body constraints tell the agent what will fail, but there is no explicit 'use this instead of read_file when the resource is remote' guidance or any named alternative. An agent can infer the niche, but the description never routes it there.

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