Skip to main content
Glama

Fix plan for an x402 endpoint ($0.05 via x402)

x402_fix
Read-only

Paid ($0.05 via x402 in USDC on Base, Solana, Monad, Polygon, Arbitrum, Avalanche, Algorand or Stellar, or in RLUSD on the XRP Ledger): diagnoses your x402 endpoint, then returns per problem the concrete change as code for your stack (express, next, hono, node, python, generic), filled in with your own payTo, amount, network and route. A working endpoint gets improvements too (ERC-8004 identity, Base Builder Code, x402scan ownership proof, skill.md, browser paywall, Bazaar output schema), each with code. For the endpoint's owner: includes the diagnosis, so there is no need to call x402_diagnose first. Same as GET /api/v1/fix. The answer carries a signed receipt (EIP-191, bound to your arguments) that proves later which verdict you got.

Input Schema

NameRequiredDescriptionDefault
urlYesThe x402 endpoint (public http(s) URL), e.g. https://api.example.com/paid
bodyNoExample JSON request body, for a POST route that checks its input before the 402 (implies POST). Without it, {} is sent and the requestBody example in the endpoint's /openapi.json is tried.
stackNoYour server stack (default: detected)
methodNoHTTP method of the paid route (default: GET, then POST)

Output Schema

NameRequiredDescriptionDefault
urlNo
fixesNoEach problem with steps and code for your stack
acceptsNoOnly on an unpaid call: the x402 payment options
overallNo
receiptNoSigned receipt (EIP-191) binding the answer to your arguments
summaryNo
unfixedNo
improvementsNoNot wrong, but makes the service easier to find, trust or pay: steps and code

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / improvements
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Not wrong, but makes the service easier to find, trust or pay: steps and code"
      +}
  2. Changed9 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / accepts / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/fixes/anyOf/0"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / fixes / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": {},
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / overall / anyOf
      Added value: +[
      +  {
      +    "description": "pass, warn or fail",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / overall / description
      Removed value: -"pass, warn or fail"
    • removedOutput schema / properties / overall / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • changedOutput schema / properties / receipt / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / unfixed / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/fixes/anyOf/0"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / body
      Added value: +{
      +  "description": "Example JSON request body, for a POST route that checks its input before the 402 (implies POST). Without it, {} is sent and the requestBody example in the endpoint's /openapi.json is tried.",
      +  "maxLength": 16384,
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "accepts": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/properties/fixes/anyOf/0"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Only on an unpaid call: the x402 payment options"
      +    },
      +    "fixes": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "additionalProperties": {},
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Each problem with steps and code for your stack"
      +    },
      +    "overall": {
      +      "description": "pass, warn or fail",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "receipt": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Signed receipt (EIP-191) binding the answer to your arguments"
      +    },
      +    "summary": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "unfixed": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/properties/fixes/anyOf/0"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the readOnlyHint/openWorldHint annotations: discloses that the call is paid ($0.05 in USDC across nine chains or RLUSD on XRP Ledger), that the result carries an EIP-191 receipt bound to the caller's arguments, and that it mirrors GET /api/v1/fix. That cost and receipt-binding information materially changes how an agent should invoke and trust the call.

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?

Front-loads the purpose and the ownership routing well, but the opening parenthetical enumerates nine payment networks, which is bulk that contributes little to a tool-selection decision. The improvement list (ERC-8004, Builder Code, Bazaar schema, etc.) is similarly long, though it does convey useful output scope.

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

Completeness5/5

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

For a four-parameter read-only diagnostic with an output schema, the description supplies everything extra an agent needs: cost, payment rails, what the fix output contains, stack-targeted code, and the receipt guarantee. Return formatting is covered by the output schema, so nothing essential is missing.

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 url, body, stack and method are already fully documented in the input schema. The description's mention of 'your own payTo, amount, network and route' refers to the generated fix code, not to input parameters, so it adds no new meaning about the arguments. Baseline 3 applies.

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 pair: it diagnoses an x402 endpoint and returns per-problem concrete code changes for the caller's stack. It also distinguishes itself from the sibling x402_diagnose by noting it bundles the diagnosis, so an agent can pick between the two 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 Guidelines4/5

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

Gives clear context for when to use it (you own the endpoint and want actionable fixes, not just a verdict) and explicitly names the alternative x402_diagnose plus the reason to skip it. It does not state exclusions, such as what a non-owner should call instead, or when a preflight check is still preferable.

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.