Skip to main content
Glama

l402-fetch-preview

Read-only

Check a URL's payment requirements before paying. Returns cost, protocol, and payment method, enabling a confirmation dialog so users can approve or cancel before any satoshis are spent.

Instructions

Preview payment requirements for a URL without spending any sats. Returns cost, protocol, and payment method so a confirmation dialog can be shown. Use this before l402-fetch to give the user a chance to approve or cancel payment. For widget hosts, the result drives a payment confirmation dialog.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to preview payment requirements for
urlsNoBatch: multiple URLs to preview
methodNoHTTP methodGET
pubkeyNoNostr pubkey for xcashu auth
headersNoAdditional request headers
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the description's claim of 'without spending any sats' reinforces but adds specific meaning (no financial side effect). It also describes what the tool returns (cost, protocol, payment method) and the intended UI usage, which goes beyond the annotation. However, it does not mention potential errors or connection issues, a minor gap given the annotations cover safety.

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, front-loaded with the primary purpose, and no filler. The usage guidance is embedded efficiently. Every clause earns its place.

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 preview tool with read-only annotations, the description covers the core purpose, return data, and usage context. It does not describe the exact output schema (since none exists), but that is compensated by stating the key fields. Minor gaps like error handling or authentication requirements are not addressed, but given the simplicity, it is largely complete.

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%, so each parameter is already documented. The description adds no parameter-specific usage detail beyond what the schema provides. It does not explain how to format arrays or headers, but the schema already covers that. Thus, baseline 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?

The description states a specific verb ('Preview'), resource ('payment requirements for a URL'), and outcome ('without spending any sats'). It clearly distinguishes from l402-fetch by positioning itself as a pre-check. The purpose is unambiguous and actionable.

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

Usage Guidelines5/5

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

Explicitly instructs to 'Use this before l402-fetch' and gives the condition (to give the user a chance to approve or cancel payment). Also mentions the widget host context. This directly routes the agent to the correct tool and tells when not to use the alternative.

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

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/forgesworn/402-mcp'

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