Skip to main content
Glama

AP2 Mandate Gateway

wever_ap2-mandate-gateway
Destructive

Paid URL: 0.10 USDC per call on Base; 10 signed-wallet free calls shared over rolling 30 days. Read the backend 402 body for x402 terms. Verifies allowlisted AP2 direct closed-checkout mandates, binds the presenter to the holder wallet, rejects expiry and replay, and durably consumes each mandate once. Operating boundary: Submit a signed AP2 direct checkout mandate from a trusted provider. Sign wallet ownership proof as its holder. The gateway checks expiry and replay, binds the holder and records one-time consumption. Agents call the gateway; humans review the exact checkout intent and sign in their wallet. POST /api/ap2-mandate-gateway. Existing product credentials, signed mandates, and single-use action grants remain required where applicable. This adapter grants no authority and never supplies server credentials. This gateway verifies only its published AP2 direct closed-checkout profile, requires a trusted issuer and holder wallet proof, and consumes the mandate once. It does not execute the checkout or transfer funds. Start at /api/ap2-contract and /api/ap2-challenge.

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": {
      "mode": "<mode>",
      "presentation": "<presentation>",
      "challenge_token": "<challenge_token>"
    },
    "name": "wever_ap2-mandate-gateway"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
presentationYes
challenge_tokenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +false
    • removedInput schema / description
      Removed value: -"The existing product POST body. Supply its documented mode, arguments, and required signed authority or grant. The product validates its full contract."
    • removedInput schema / maxProperties
      Removed value: -64
    • removedInput schema / minProperties
      Removed value: -1
    • addedInput schema / properties / challenge_token
      Added value: +{
      +  "maxLength": 16384,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / mode / const
      Added value: +"verify_mandate"
    • removedInput schema / properties / mode / maxLength
      Removed value: -128
    • removedInput schema / properties / mode / minLength
      Removed value: -1
    • removedInput schema / properties / mode / type
      Removed value: -"string"
    • addedInput schema / properties / presentation
      Added value: +{
      +  "maxLength": 32768,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "mode",
      +  "presentation",
      +  "challenge_token"
      +]
  2. First observed

TDQS

A4/5.0
Behavior5/5

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

Beyond annotations, the description discloses the exact destructive effect — durable one-time mandate consumption — plus expiry/replay rejection, holder binding, credential requirements, and the explicit statement that it grants no authority and never supplies server credentials. This is rich behavioral context consistent with the destructive and non-idempotent annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded and organized around pricing, operating boundary, endpoint, and restrictions, but it is dense and repetitive. The one-time-consumption behavior and verification-only scope are restated several times, reducing conciseness.

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

Completeness3/5

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

For a complex mutation tool with no output schema and 0% parameter schema coverage, the description thoroughly covers auth, safety, and mutation behavior. However, it does not compensate for the missing parameter-level semantics of all three required inputs, leaving a meaningful completeness gap.

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 description coverage is 0% for three required parameters. The description mentions a signed mandate and wallet proof, but it does not map those concepts to 'presentation', 'challenge_token', or 'mode', nor does it explain the challenge token's role or format, leaving parameter meaning under-specified.

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 and resource: it verifies allowlisted AP2 direct closed-checkout mandates, binds the presenter to the holder wallet, rejects expiry/replay, and consumes each mandate once. It also explicitly says it does not execute the checkout or transfer funds, which distinguishes it from payment-execution siblings.

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?

The 'Operating boundary' sentence gives clear usage context: submit a signed AP2 direct checkout mandate from a trusted provider and sign wallet ownership proof as its holder. It also clarifies that agents call the gateway while humans review and sign, though it does not name specific alternative sibling tools for adjacent use cases.

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.