Skip to main content
Glama

Run a paid web-data query

run_query

Fetch a URL and extract structured data, paying in USDC via x402 (production networks). mode "fetch" (default) returns title/description/text; "links" returns outbound links; "images" returns image sources + alt text; "metadata" returns all meta tags + response headers. Call without paymentHeader first to receive the price + payment requirements; retry with paymentHeader set to a signed X-PAYMENT value to get the result.

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

Input Schema

NameRequiredDescriptionDefault
urlYesThe URL to fetch and extract data from
modeNoDefaults to "fetch"
agentIdNoYour registered agent id, for attribution
paymentHeaderNoSigned x402 X-PAYMENT payload (base64). Omit on first call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations present the description carries the full behavioral burden, and it does substantial work: it discloses that the call is paid in USDC via x402, that it targets production networks, and that the protocol is a two-phase challenge/settle handshake. It omits pricing magnitude, whether a retry can double-charge, and error behavior on payment rejection, so it is strong but not exhaustive.

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?

Three sentences, front-loaded with the core action and cost model before the mode enumeration and the payment handshake. Dense but every clause conveys operational information. Slightly heavy as a single paragraph with embedded quoting, which costs it the top score.

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?

No output schema and no annotations exist, so the description must explain returns, and it does so per mode. The payment protocol, the required url, and the optional attribution/payment fields are all covered. Remaining gaps are pricing specifics and failure/replay semantics, which are secondary to calling it correctly.

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 description coverage is 100%, so the baseline is 3; the description earns an extra point by documenting each mode's return payload (title/description/text, outbound links, image sources + alt text, meta tags + headers) and by explaining the intended lifecycle of paymentHeader ('omit on first call' then pass a signed X-PAYMENT). That is genuine meaning beyond the schema strings.

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?

States a concrete verb+resource ('Fetch a URL and extract structured data') and enumerates the four modes and their return shapes, which is more than most definitions offer. It does not, however, differentiate itself from siblings such as extract_links, extract_images, or get_metadata, whose functions overlap with the 'links', 'images', and 'metadata' modes here.

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?

Gives explicit procedural guidance for the paid flow: 'Call without paymentHeader first to receive the price + payment requirements; retry with paymentHeader set to a signed X-PAYMENT value.' That is actionable sequencing rarely found in sibling tools. It stops short of saying when to prefer this tool over the overlapping extract_* / get_* siblings.

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