Skip to main content
Glama

x402_fetch

Fetch a URL and handle x402 payment requirements by signing a Hedera USDC payment on 402 responses, then return the final response body with diagnostics.

Instructions

Fetch a URL that may be x402-gated. If the server returns 402, sign a Hedera USDC payment, retry with the payment header, and return the final response body. Includes diagnostic info in the response for debugging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to fetch (may be x402-gated)
bodyNoRequest body, if any (raw string)
methodNoHTTP methodGET
headersNoExtra headers to send with the request
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It discloses the conditional payment flow (signing a Hedera USDC payment on 402 and retrying) plus diagnostic info, but leaves the diagnostic structure unspecified.

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?

Two sentences with front-loaded purpose and a clear step sequence. No filler words and the payment retry logic is summarized efficiently.

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

Completeness3/5

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

Adequate for a fetch tool, but with no output schema and only vague mention of diagnostic info, the return value shape is unclear. The payment flow adds complexity that could use more detail on failure cases.

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 covers all four parameters (url, body, method, headers) with descriptions, so the description adds little beyond the x402 context. Baseline of 3 is appropriate.

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?

Clearly states a specific verb ('Fetch') and resource ('a URL that may be x402-gated'). It is distinct from sibling tools which handle balances, transfers, and payments, leaving no ambiguity about its role.

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?

Provides clear context for when to use (fetching URLs that may require x402 payment). However, it doesn't explicitly state when not to use it or name alternatives, though the sibling list implies the domain.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DarshanKrishna-DK/Hedwig'

If you have feedback or need assistance with the MCP directory API, please join our Discord server