Skip to main content
Glama

http_get

Read-onlyIdempotent

Fetch web content via HTTP GET, returning status, headers, and body with automatic JSON parsing and SSRF protection.

Instructions

Perform an HTTP GET. Returns status, headers, and body. Automatically parses JSON when the server responds with application/json. Follows redirects (each hop re-validated against SSRF rules). Refuses URLs that resolve to private/loopback/link-local addresses unless the operator enabled FETCH_MCP_ALLOW_PRIVATE_HOSTS and the call sets allow_private_hosts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL (http:// or https://)
headersNoExtra request headers as a key/value object
retriesNoRetries on 408/425/429/500/502/503/504 with exponential backoff (default 0)
max_bytesNoMax response body size in bytes before the body is truncated (default 5MiB, ceiling 100MiB)
basic_authNoHTTP Basic auth credentials
timeout_msNoTimeout in ms for each attempt, covering DNS, every redirect hop and the body (default 10000, max 120000). Retries get a fresh budget; a whole call is capped at 5 minutes.
user_agentNoUser-Agent override (default identifies as @yawlabs/fetch-mcp)
decode_textNoForce text decoding (true) or binary base64 (false). Defaults to auto — text for text/*, json, xml, etc; binary otherwise.
bearer_tokenNoBearer token sent as Authorization: Bearer <token>
max_redirectsNoMax redirect hops to follow (default 5)
allow_private_hostsNoAllow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • changedInput schema / properties / allow_private_hosts / description
      Previous value: -"Allow requests to loopback / private / link-local addresses. SSRF protection is on by default — only flip this when intentionally talking to localhost."New value: +"Allow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way."
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"Request timeout in ms (default 10000, max 120000)"New value: +"Timeout in ms for each attempt, covering DNS, every redirect hop and the body (default 10000, max 120000). Retries get a fresh budget; a whole call is capped at 5 minutes."
  2. First observedv0.6.1

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already signal read-only, idempotent, non-destructive behavior, so the description adds valuable context on top: automatic JSON parsing, redirect-following with SSRF re-validation on every hop, and refusal of private/loopback/link-local addresses unless both operator-level and per-call opt-ins are set. This discloses non-obvious security and parsing behavior beyond what annotations or schema convey.

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 sentences deliver the core action, return payload, parsing behavior, redirect policy, and SSRF restrictions with zero filler. The most important operational facts are front-loaded before the safety caveat, making it easy for an agent to quickly decide and invoke.

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?

Despite having 11 parameters and no output schema, the description covers the returned shape, JSON parsing, redirect handling, and SSRF constraints, while the schema documents every parameter. The agent has enough to invoke the tool correctly and interpret its response; there are no material gaps requiring additional inference.

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%, and every parameter including url, retries, timeout_ms, max_bytes, basic_auth, bearer_token, and allow_private_hosts already has a meaningful schema description. The description adds only a brief echo of the allow_private_hosts SSRF nuance, so the baseline of 3 is appropriate; it neither hurts nor substantially compensates for schema documentation.

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 ('Perform an HTTP GET') and adds the return shape ('Returns status, headers, and body'), which makes the tool immediately identifiable among siblings like http_post, http_head, and fetch_html_to_markdown. The description goes beyond the tool name by specifying response contents and JSON parsing behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance is given about when to prefer http_get over the many sibling tools, such as fetch_reader or fetch_html_to_markdown, or when it should be avoided. The description implies use for raw HTTP GET retrieval, but it never states exclusions or alternatives, leaving the agent to infer selection from the name alone.

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