Skip to main content
Glama

x402 Agent Toolkit — Quant Arb, TWSE & Agent Security

safe_fetch

[$0.015 USDC via x402] Security shield for wallet-enabled AI agents: fetches any public URL, strips hidden prompt injections (zero-width unicode, invisible CSS/HTML comments, system-override directives, data-exfiltration links), and returns sanitized Markdown + SHA-256 digest + GO/WARN/BLOCK verdict.

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

Input Schema

NameRequiredDescriptionDefault
urlYesPublic http(s) URL to fetch and sanitize against prompt injections.
max_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does substantial work: it discloses a per-call price ($0.015 USDC via x402 payment), enumerates the specific injection classes stripped (zero-width unicode, invisible CSS/HTML, system-override directives, exfiltration links), and names the output shape including a verdict enum. Gaps remain around failure behavior — what is returned on BLOCK, whether payment is charged on failed fetches, and any auth/rate limits — which keeps this from a 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?

A single dense sentence with the price front-loaded in brackets and the core action immediately after, so the important routing information comes first. It is long and comma-heavy, but nearly every clause carries distinct information (cost, targets, outputs) rather than padding.

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?

For a two-parameter tool with no output schema and no annotations, the description covers purpose, payment cost, filtering scope, and return contents well enough to invoke correctly. The remaining hole is the undocumented max_chars parameter and the unstated behavior on a BLOCK verdict, which an agent would need to know before relying on the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%: the url parameter is documented in the schema, but max_chars has just a default and no description anywhere. The description never explains truncation semantics or, critically, whether truncation affects the SHA-256 digest and the GO/WARN/BLOCK verdict — so it fails to compensate for the coverage gap on the one undocumented parameter.

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 uses a concrete verb-and-resource pair ("fetches any public URL") and immediately differentiates itself from a plain scraping tool by naming the sanitization targets and the returned artifacts (sanitized Markdown, SHA-256 digest, GO/WARN/BLOCK verdict). An agent can tell from the text alone that this is a security-filtered fetch, not a generic page-to-Markdown converter.

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 only implied through the framing "Security shield for wallet-enabled AI agents," which suggests untrusted content pipelines but never states when to choose this over a plain fetch or web_to_markdown sibling. There are no exclusions, no prerequisites, and no mention of how it relates to the nearby preflight/scan tools, leaving the routing decision to inference.

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.