{
  "tool": {
    "slug": "json-repair",
    "title": "JSON Repair",
    "category": "Structured Output",
    "description": "Repair common LLM JSON failures: markdown fences, trailing commas, and unclosed arrays or objects.",
    "buyerIntent": "Use when an agent received malformed JSON and wants a deterministic repair before asking the model again.",
    "tokenValue": "Avoids a full LLM retry for dirty but recoverable structured output.",
    "method": "POST",
    "rawBlueprintSlug": "json-lax-parser",
    "priceUSDC": 0.003,
    "latencyTargetMs": 180,
    "status": "live-preview",
    "tags": [
      "json",
      "parser",
      "repair",
      "structured-output"
    ],
    "requestSchema": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "required": [
            "rawText"
          ],
          "properties": {
            "rawText": {
              "type": "string"
            }
          }
        }
      ]
    },
    "responseSchema": {
      "type": "object",
      "properties": {
        "parsed": {},
        "repaired": {
          "type": "boolean"
        }
      }
    },
    "sampleRequest": {
      "rawText": "```json\n{\"status\":\"ok\",\"items\":[1,2,\n```"
    },
    "sampleResponse": {
      "parsed": {
        "status": "ok",
        "items": [
          1,
          2
        ]
      },
      "repaired": true
    },
    "endpoint": "/api/v1/agent-tools/json-repair/",
    "absoluteEndpoint": "https://elpa.space/api/v1/agent-tools/json-repair/",
    "pageUrl": "https://elpa.space/agent-tools/#json-repair",
    "rawBlueprintUrl": "https://elpa.space/raw/json-lax-parser",
    "priceLabel": "0.003 USDC"
  },
  "payment": {
    "protocol": "x402",
    "implementation": "x402 v2 exact EVM facilitator with legacy Base USDC transaction-hash fallback",
    "network": "Base",
    "networkCaip2": "eip155:8453",
    "currency": "USDC",
    "tokenContract": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "recipientAddress": "0xd9d6ae1d5a2128fea511460fac8e4dea58baf153",
    "paymentHeaders": [
      "PAYMENT-SIGNATURE",
      "X-PAYMENT",
      "x402-tx-hash (legacy)"
    ],
    "challengeHeader": "PAYMENT-REQUIRED",
    "responseHeader": "PAYMENT-RESPONSE",
    "facilitatorEnv": [
      "X402_FACILITATOR_URL",
      "X402_FACILITATOR_AUTHORIZATION"
    ],
    "maxTimeoutSeconds": 120,
    "priceUSDC": 0.003,
    "x402": {
      "x402Version": 2,
      "resource": {
        "url": "https://elpa.space/api/v1/agent-tools/json-repair/",
        "description": "Repair common LLM JSON failures: markdown fences, trailing commas, and unclosed arrays or objects.",
        "mimeType": "application/json",
        "serviceName": "ELPA Agent Tools",
        "tags": [
          "json",
          "parser",
          "repair",
          "structured-output"
        ],
        "iconUrl": "https://elpa.space/logo.svg"
      },
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "3000",
          "asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
          "payTo": "0xd9d6ae1d5a2128fea511460fac8e4dea58baf153",
          "maxTimeoutSeconds": 120,
          "extra": {
            "name": "USDC",
            "version": "2",
            "decimals": 6
          }
        }
      ],
      "paymentRequired": {
        "x402Version": 2,
        "error": "PAYMENT-SIGNATURE header is required",
        "resource": {
          "url": "https://elpa.space/api/v1/agent-tools/json-repair/",
          "description": "Repair common LLM JSON failures: markdown fences, trailing commas, and unclosed arrays or objects.",
          "mimeType": "application/json",
          "serviceName": "ELPA Agent Tools",
          "tags": [
            "json",
            "parser",
            "repair",
            "structured-output"
          ],
          "iconUrl": "https://elpa.space/logo.svg"
        },
        "accepts": [
          {
            "scheme": "exact",
            "network": "eip155:8453",
            "amount": "3000",
            "asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "payTo": "0xd9d6ae1d5a2128fea511460fac8e4dea58baf153",
            "maxTimeoutSeconds": 120,
            "extra": {
              "name": "USDC",
              "version": "2",
              "decimals": 6
            }
          }
        ],
        "extensions": {
          "bazaar": {
            "info": {
              "discoverable": true,
              "category": "Structured Output",
              "tags": [
                "json",
                "parser",
                "repair",
                "structured-output"
              ],
              "input": {
                "rawText": "```json\n{\"status\":\"ok\",\"items\":[1,2,\n```"
              },
              "output": {
                "parsed": {
                  "status": "ok",
                  "items": [
                    1,
                    2
                  ]
                },
                "repaired": true
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "discoverable": {
                  "type": "boolean"
                },
                "category": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "input": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "rawText"
                      ],
                      "properties": {
                        "rawText": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "output": {
                  "type": "object",
                  "properties": {
                    "parsed": {},
                    "repaired": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "paymentRequiredBase64": "eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3IiOiJQQVlNRU5ULVNJR05BVFVSRSBoZWFkZXIgaXMgcmVxdWlyZWQiLCJyZXNvdXJjZSI6eyJ1cmwiOiJodHRwczovL2VscGEuc3BhY2UvYXBpL3YxL2FnZW50LXRvb2xzL2pzb24tcmVwYWlyLyIsImRlc2NyaXB0aW9uIjoiUmVwYWlyIGNvbW1vbiBMTE0gSlNPTiBmYWlsdXJlczogbWFya2Rvd24gZmVuY2VzLCB0cmFpbGluZyBjb21tYXMsIGFuZCB1bmNsb3NlZCBhcnJheXMgb3Igb2JqZWN0cy4iLCJtaW1lVHlwZSI6ImFwcGxpY2F0aW9uL2pzb24iLCJzZXJ2aWNlTmFtZSI6IkVMUEEgQWdlbnQgVG9vbHMiLCJ0YWdzIjpbImpzb24iLCJwYXJzZXIiLCJyZXBhaXIiLCJzdHJ1Y3R1cmVkLW91dHB1dCJdLCJpY29uVXJsIjoiaHR0cHM6Ly9lbHBhLnNwYWNlL2xvZ28uc3ZnIn0sImFjY2VwdHMiOlt7InNjaGVtZSI6ImV4YWN0IiwibmV0d29yayI6ImVpcDE1NTo4NDUzIiwiYW1vdW50IjoiMzAwMCIsImFzc2V0IjoiMHg4MzM1ODlmY2Q2ZWRiNmUwOGY0YzdjMzJkNGY3MWI1NGJkYTAyOTEzIiwicGF5VG8iOiIweGQ5ZDZhZTFkNWEyMTI4ZmVhNTExNDYwZmFjOGU0ZGVhNThiYWYxNTMiLCJtYXhUaW1lb3V0U2Vjb25kcyI6MTIwLCJleHRyYSI6eyJuYW1lIjoiVVNEQyIsInZlcnNpb24iOiIyIiwiZGVjaW1hbHMiOjZ9fV0sImV4dGVuc2lvbnMiOnsiYmF6YWFyIjp7ImluZm8iOnsiZGlzY292ZXJhYmxlIjp0cnVlLCJjYXRlZ29yeSI6IlN0cnVjdHVyZWQgT3V0cHV0IiwidGFncyI6WyJqc29uIiwicGFyc2VyIiwicmVwYWlyIiwic3RydWN0dXJlZC1vdXRwdXQiXSwiaW5wdXQiOnsicmF3VGV4dCI6ImBgYGpzb25cbntcInN0YXR1c1wiOlwib2tcIixcIml0ZW1zXCI6WzEsMixcbmBgYCJ9LCJvdXRwdXQiOnsicGFyc2VkIjp7InN0YXR1cyI6Im9rIiwiaXRlbXMiOlsxLDJdfSwicmVwYWlyZWQiOnRydWV9fSwic2NoZW1hIjp7InR5cGUiOiJvYmplY3QiLCJwcm9wZXJ0aWVzIjp7ImRpc2NvdmVyYWJsZSI6eyJ0eXBlIjoiYm9vbGVhbiJ9LCJjYXRlZ29yeSI6eyJ0eXBlIjoic3RyaW5nIn0sInRhZ3MiOnsidHlwZSI6ImFycmF5IiwiaXRlbXMiOnsidHlwZSI6InN0cmluZyJ9fSwiaW5wdXQiOnsib25lT2YiOlt7InR5cGUiOiJzdHJpbmcifSx7InR5cGUiOiJvYmplY3QiLCJyZXF1aXJlZCI6WyJyYXdUZXh0Il0sInByb3BlcnRpZXMiOnsicmF3VGV4dCI6eyJ0eXBlIjoic3RyaW5nIn19fV19LCJvdXRwdXQiOnsidHlwZSI6Im9iamVjdCIsInByb3BlcnRpZXMiOnsicGFyc2VkIjp7fSwicmVwYWlyZWQiOnsidHlwZSI6ImJvb2xlYW4ifX19fX19fX0=",
      "facilitator": {
        "url": "https://api.cdp.coinbase.com/platform/v2/x402",
        "verify": "/verify",
        "settle": "/settle"
      },
      "legacy": {
        "enabled": true,
        "header": "x402-tx-hash",
        "note": "Legacy Base USDC transaction-hash receipts remain accepted for manual testing, but PAYMENT-SIGNATURE is the primary x402 path."
      }
    }
  }
}