Skip to main content
Glama

get_x402_scaffold

Generates a single-file Python or Go EIP-712 integration scaffold with the exact AgentPay x402 domain, types, and a self-test vector, plus optional live /verify failure stats and first-time success rates.

Instructions

EIP-712 integration scaffold + live failure diagnostics for the AgentPay x402 facilitator (invention #4240). With stats=False, returns the single-file integration scaffold (lang 'py' or 'go') with the EXACT AgentPay EIP-712 domain and types, a known-good self-test vector, and its unique scaffold_id — run the code offline with --self-test to validate your environment before paying on mainnet. With stats=True, returns the live /verify failure-code distribution (14d) and the scaffold users' first-time success rate. Free to call.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_x402_scaffold"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNopy
statsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does disclose meaningful traits: the tool is free to call, output is mode-dependent, it returns a scaffold_id, and the code can be validated offline before any on-chain payment. It does not address rate limits, persistence/stability of scaffold_id, or error behavior, so the disclosure is good but not complete.

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?

Two sentences, front-loaded with purpose, then the two modes in parallel structure. The only waste is the parenthetical '(invention #4240)', which adds no decision value for an invoking agent.

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, read-only tool with no output schema and no annotations, the description explains both modes' return content and the recommended workflow. Minor gaps remain around defaults, output size, and any rate or caching behavior, but nothing critical to correct invocation is missing.

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 coverage is 0%, so the description must compensate, and it largely does: it specifies the accepted 'lang' values ('py' or 'go') — which the schema does not enumerate — and explains exactly what each stats value returns. Only the default behavior when parameters are omitted is left implicit.

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?

The description uses a specific verb and resource ('returns the single-file integration scaffold', 'live /verify failure-code distribution') and clearly separates the two modes via stats=False/True. It does not, however, distinguish itself from similarly named siblings such as get_x402_integrate_stats or get_x402_mcp_adapter, leaving an agent to infer the boundary.

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 gives concrete usage context: run the scaffold offline with --self-test 'before paying on mainnet', and use stats=True when the failure-code distribution or first-time success rate is wanted. It stops short of naming exclusions or pointing to sibling tools for adjacent needs.

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

Deploy Server

Other Tools