Skip to main content
Glama

x402_create_paywall

Create paywalls by responding with HTTP 402 Payment Required, letting you charge crypto for your API and AI agent services.

Instructions

Generate an HTTP 402 Payment Required response for your own API endpoints. Use this to monetize your AI agent's services or API endpoints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
priceYesPrice to charge (e.g. '0.10')
tokenNoToken to acceptUSDs
resourceNoResource/endpoint identifier
validForNoPayment validity period in seconds (default 5 min)
descriptionNoDescription of what the payment is for
Behavior2/5

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

No annotations are present, so the description must disclose behavior. It explains the core action (generate HTTP 402 response) but omits side effects, persistence, permissions, or return semantics. The agent cannot tell whether calling this modifies state or just returns a response.

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?

The description is two short sentences with no wasted words. The main verb and resource are front-loaded, making it easy to scan and understand.

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

Completeness2/5

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

With no output schema and no mention of return values or lifecycle, the description is insufficient for a creation tool with five parameters. It needs to state what the tool returns and what behavior the created paywall has. The current description leaves significant gaps.

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 descriptions cover 100% of parameters, so the baseline is 3. The description adds overall context but no per-parameter detail. Since the schema already documents each parameter clearly, the description doesn't need to compensate.

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 clearly identifies the tool's function: generating an HTTP 402 Payment Required response for your own API endpoints. It also explicitly ties the tool to monetization, distinguishing it from sibling tools like x402_pay_request or x402_tx_status.

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?

It provides clear context on when to use the tool ('monetize your AI agent's services or API endpoints'), but does not mention alternatives or exclusions relative to other x402 tools. This is clear context without explicit when-not or alternative guidance.

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/nirholas/universal-crypto-mcp'

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