Skip to main content
Glama

create_ap2_challenge

Free prerequisite for AP2-native transaction clearance or authorization. Call before clearance_x402_ap2 or authorize_x402_ap2, bind the returned challenge into the AP2 Payment Mandate proof, then pass that challenge token as ap2_authority.challenge_token. The challenge is short-lived and intended for one purchase flow.

Input Schema

NameRequiredDescriptionDefault
ttl_secondsNoChallenge lifetime in seconds. Optional; must be 30-300 seconds when provided.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / ttl_seconds / description
      Added value: +"Challenge lifetime in seconds. Optional; must be 30-300 seconds when provided."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden; it discloses that the call is free, that the challenge is short-lived, and that it is single-use per purchase flow, plus what to do with the returned token. It stops short of auth/permission requirements or error behavior, which is the only remaining gap.

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?

Three sentences, front-loaded with what the tool is, then the call order, then the usage constraint. Every sentence carries distinct information with no repetition.

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 exists, and the description compensates by explaining what is returned (a challenge bound into the Payment Mandate proof) and where the token goes (ap2_authority.challenge_token). Auth requirements and failure modes are unstated, but for a one-parameter prerequisite token tool this is close to 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% and ttl_seconds is fully documented in the schema (30-300s), so the schema does the heavy lifting. The description adds no parameter-level detail beyond it, which matches the baseline 3 for high coverage.

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?

States a specific verb+resource (create an AP2 challenge) and immediately positions it as a prerequisite, naming the two siblings it feeds (clearance_x402_ap2, authorize_x402_ap2). An agent can distinguish it from every sibling without opening a schema.

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?

Explicit ordering guidance: call before clearance_x402_ap2 or authorize_x402_ap2, then bind the returned challenge into the AP2 Payment Mandate proof and pass the token as ap2_authority.challenge_token. It also states the scope limit ('one purchase flow'), so when-not-to-reuse is covered.

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