{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Blockchain Money Map API",
    "version": "0.1.0",
    "summary": "Agent-discoverable wallet intelligence and public blockchain research API.",
    "description": "Blockchain Money Map provides public blockchain research reports for wallet addresses and transaction hashes, with agent-facing discovery through MCP, x402, an agent manifest, and llms.txt. Research reports only. No wallet connection, private keys, seed phrases, transaction signing, trading execution, or financial, legal, tax, investment, trading, or compliance advice.",
    "contact": {
      "name": "Blockchain Money Map",
      "url": "https://blockchainmoneymap.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://blockchainmoneymap.com"
    }
  },
  "servers": [
    {
      "url": "https://api.blockchainmoneymap.com",
      "description": "Production API and agent discovery host"
    },
    {
      "url": "https://blockchainmoneymap.com",
      "description": "Production public website host"
    }
  ],
  "externalDocs": {
    "description": "Agent documentation",
    "url": "https://api.blockchainmoneymap.com/agents"
  },
  "x-bmm-discovery": {
    "seller_provider": true,
    "service_category": "paid wallet intelligence API",
    "openapi_url": "https://api.blockchainmoneymap.com/openapi.json",
    "openapi_aliases": [
      "https://api.blockchainmoneymap.com/.well-known/openapi.json",
      "https://api.blockchainmoneymap.com/swagger.json"
    ],
    "x402_discovery_url": "https://api.blockchainmoneymap.com/.well-known/x402.json",
    "x402_discovery_alias": "https://api.blockchainmoneymap.com/.well-known/x402",
    "mcp_discovery_url": "https://api.blockchainmoneymap.com/.well-known/mcp",
    "agent_manifest_url": "https://api.blockchainmoneymap.com/api/agents/manifest",
    "agent_docs_url": "https://api.blockchainmoneymap.com/agents",
    "safety": [
      "Research reports only.",
      "No private keys, seed phrases, wallet connection, signing, or trade execution.",
      "No financial, legal, tax, investment, trading, or compliance advice."
    ]
  },
  "tags": [
    {
      "name": "Discovery",
      "description": "Public discovery documents for agents, crawlers, MCP clients, and x402 buyers."
    },
    {
      "name": "Health",
      "description": "Public service health metadata."
    },
    {
      "name": "MCP",
      "description": "Model Context Protocol discovery and JSON-RPC endpoint."
    },
    {
      "name": "x402",
      "description": "Paid agent wallet intelligence endpoints. Unpaid calls return x402 payment-required metadata."
    },
    {
      "name": "Public Beta",
      "description": "Human-facing public beta report generation, saved reports, email requests, and follow-up request endpoints."
    },
    {
      "name": "Analytics",
      "description": "Public beta client event tracking endpoint."
    }
  ],
  "security": [],
  "paths": {
    "/openapi.json": {
      "get": {
        "tags": ["Discovery"],
        "operationId": "getOpenApiDocument",
        "summary": "Get the OpenAPI 3.1 document",
        "description": "Returns this OpenAPI 3.1 document for Blockchain Money Map.",
        "responses": {
          "200": {
            "description": "OpenAPI document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/.well-known/openapi.json": {
      "get": {
        "tags": ["Discovery"],
        "operationId": "getWellKnownOpenApiDocument",
        "summary": "Get the OpenAPI 3.1 document from a well-known discovery path",
        "description": "Returns the same OpenAPI 3.1 document for base-URL crawlers that probe /.well-known/openapi.json.",
        "responses": {
          "200": {
            "description": "OpenAPI document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/swagger.json": {
      "get": {
        "tags": ["Discovery"],
        "operationId": "getSwaggerJsonOpenApiAlias",
        "summary": "Get the OpenAPI 3.1 document from the Swagger alias",
        "description": "Returns the same OpenAPI 3.1 document for crawlers that probe /swagger.json.",
        "responses": {
          "200": {
            "description": "OpenAPI document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents": {
      "get": {
        "tags": ["Discovery"],
        "operationId": "getAgentDocsPage",
        "summary": "Get the agent documentation page",
        "description": "Returns the public agent-facing documentation page.",
        "responses": {
          "200": {
            "description": "HTML agent documentation page.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": ["Discovery"],
        "operationId": "getLlmsTxt",
        "summary": "Get llms.txt",
        "description": "Returns the agent-readable text discovery document with public human and API surfaces.",
        "responses": {
          "200": {
            "description": "Plain-text LLM discovery document.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/AgentDiscoveryDisabled"
          }
        }
      }
    },
    "/.well-known/ai": {
      "get": {
        "tags": ["Discovery"],
        "operationId": "getAiDiscovery",
        "summary": "Get AI discovery metadata",
        "description": "Returns a public AI discovery document linking the manifest, MCP discovery, x402 discovery, health endpoint, and public tools.",
        "responses": {
          "200": {
            "description": "AI discovery document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiDiscoveryDocument"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/AgentDiscoveryDisabled"
          }
        }
      }
    },
    "/.well-known/mcp": {
      "get": {
        "tags": ["Discovery", "MCP"],
        "operationId": "getMcpDiscovery",
        "summary": "Get MCP discovery metadata",
        "description": "Returns the MCP discovery document linking the MCP JSON-RPC endpoint, agent manifest, and x402 manifest.",
        "responses": {
          "200": {
            "description": "MCP discovery document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDiscoveryDocument"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/AgentDiscoveryDisabled"
          }
        }
      }
    },
    "/.well-known/x402.json": {
      "get": {
        "tags": ["Discovery", "x402"],
        "operationId": "getX402Discovery",
        "summary": "Get x402 discovery manifest",
        "description": "Returns the x402 manifest advertising paid Blockchain Money Map resources.",
        "responses": {
          "200": {
            "description": "x402 discovery manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402DiscoveryDocument"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/AgentDiscoveryDisabled"
          }
        }
      }
    },
    "/.well-known/x402": {
      "get": {
        "tags": ["Discovery", "x402"],
        "operationId": "getX402DiscoveryAlias",
        "summary": "Get x402 discovery manifest from the extensionless alias",
        "description": "Returns the same x402 manifest as /.well-known/x402.json for crawlers that probe extensionless well-known paths.",
        "responses": {
          "200": {
            "description": "x402 discovery manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402DiscoveryDocument"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/AgentDiscoveryDisabled"
          }
        }
      }
    },
    "/api/agents/manifest": {
      "get": {
        "tags": ["Discovery"],
        "operationId": "getAgentManifest",
        "summary": "Get the Blockchain Money Map agent manifest",
        "description": "Returns machine-readable agent tool metadata, x402 links, MCP links, pricing, and safety notes.",
        "responses": {
          "200": {
            "description": "Agent manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentManifest"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/AgentDiscoveryDisabled"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "tags": ["Health"],
        "operationId": "getHealth",
        "summary": "Get public API health",
        "description": "Returns public service readiness booleans for core dependencies and agent discovery surfaces.",
        "responses": {
          "200": {
            "description": "Public health response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "tags": ["MCP"],
        "operationId": "getMcpMetadata",
        "summary": "Get MCP metadata",
        "description": "Returns MCP metadata when enabled, or a documented disabled stub when MCP execution is not enabled.",
        "responses": {
          "200": {
            "description": "MCP metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpMetadata"
                }
              }
            }
          },
          "405": {
            "description": "SSE streams are not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "MCP execution is not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDisabledStub"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["MCP"],
        "operationId": "postMcpJsonRpc",
        "summary": "Call the MCP JSON-RPC endpoint",
        "description": "Accepts MCP JSON-RPC methods such as initialize, ping, tools/list, and tools/call. Paid tool calls return structured x402 payment-required metadata unless a valid x402 payment is supplied.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              },
              "examples": {
                "initialize": {
                  "summary": "Initialize MCP",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "initialize",
                    "params": {
                      "protocolVersion": "2025-11-25",
                      "capabilities": {},
                      "clientInfo": {
                        "name": "example-agent",
                        "version": "1.0.0"
                      }
                    }
                  }
                },
                "toolsList": {
                  "summary": "List tools",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 2,
                    "method": "tools/list"
                  }
                },
                "walletAuditToolCall": {
                  "summary": "Call wallet audit tool without payment",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 3,
                    "method": "tools/call",
                    "params": {
                      "name": "bmm_wallet_audit",
                      "arguments": {
                        "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
                        "chain": "base"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result. Tool calls may return structured payment_required content.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/JsonRpcSuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/JsonRpcErrorResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/JsonRpcClientError"
          },
          "403": {
            "description": "MCP origin is not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "MCP execution is not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDisabledStub"
                }
              }
            }
          }
        }
      }
    },
    "/api/x402/wallet-audit": {
      "post": {
        "tags": ["x402"],
        "operationId": "postX402WalletAudit",
        "summary": "Create a paid basic wallet audit",
        "description": "Audits a public EVM wallet or contract address. Unpaid requests return 402 x402 payment requirements.",
        "security": [
          {
            "x402Payment": []
          }
        ],
        "x-x402": {
          "resource_id": "wallet_audit",
          "discoverable": true,
          "seller_provider": "Blockchain Money Map",
          "price": {
            "amount": "1.00",
            "currency": "USDC",
            "network": "base"
          },
          "discovery_url": "https://api.blockchainmoneymap.com/.well-known/x402.json",
          "payment_header": "X-PAYMENT",
          "safety": "Public wallet research report only. No wallet connection, private keys, signing, trading, or financial/legal/tax/investment/compliance advice."
        },
        "x-bazaar": {
          "serviceName": "Blockchain Money Map",
          "tags": ["wallet-intelligence", "x402", "mcp", "web3", "api"],
          "input": {
            "type": "http",
            "method": "POST",
            "bodyType": "json"
          },
          "output": {
            "type": "json"
          }
        },
        "requestBody": {
          "$ref": "#/components/requestBodies/X402AddressAuditRequest"
        },
        "responses": {
          "200": {
            "description": "Paid wallet audit result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402WalletAuditSuccess"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "503": {
            "$ref": "#/components/responses/X402Unavailable"
          }
        }
      }
    },
    "/api/x402/deep-wallet-report": {
      "post": {
        "tags": ["x402"],
        "operationId": "postX402DeepWalletReport",
        "summary": "Create a paid deep wallet report",
        "description": "Generates a richer paid wallet report and saved report URL. Unpaid requests return 402 x402 payment requirements.",
        "security": [
          {
            "x402Payment": []
          }
        ],
        "x-x402": {
          "resource_id": "deep_wallet_report",
          "discoverable": true,
          "seller_provider": "Blockchain Money Map",
          "price": {
            "amount": "5.00",
            "currency": "USDC",
            "network": "base"
          },
          "discovery_url": "https://api.blockchainmoneymap.com/.well-known/x402.json",
          "payment_header": "X-PAYMENT",
          "safety": "Public wallet research report only. No wallet connection, private keys, signing, trading, or financial/legal/tax/investment/compliance advice."
        },
        "x-bazaar": {
          "serviceName": "Blockchain Money Map",
          "tags": ["wallet-intelligence", "x402", "mcp", "web3", "api"],
          "input": {
            "type": "http",
            "method": "POST",
            "bodyType": "json"
          },
          "output": {
            "type": "json"
          }
        },
        "requestBody": {
          "$ref": "#/components/requestBodies/X402AddressAuditRequest"
        },
        "responses": {
          "200": {
            "description": "Paid deep wallet report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402DeepWalletReportSuccess"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "503": {
            "$ref": "#/components/responses/X402Unavailable"
          }
        }
      }
    },
    "/api/x402/tx-decode": {
      "post": {
        "tags": ["x402"],
        "operationId": "postX402TransactionDecode",
        "summary": "Create a paid transaction decode",
        "description": "Decodes a public EVM transaction hash. Unpaid requests return 402 x402 payment requirements.",
        "security": [
          {
            "x402Payment": []
          }
        ],
        "x-x402": {
          "resource_id": "tx_decode",
          "discoverable": true,
          "seller_provider": "Blockchain Money Map",
          "price": {
            "amount": "0.25",
            "currency": "USDC",
            "network": "base"
          },
          "discovery_url": "https://api.blockchainmoneymap.com/.well-known/x402.json",
          "payment_header": "X-PAYMENT",
          "safety": "Public transaction-hash research report only. No wallet connection, private keys, signing, trading, or financial/legal/tax/investment/compliance advice."
        },
        "x-bazaar": {
          "serviceName": "Blockchain Money Map",
          "tags": ["wallet-intelligence", "x402", "mcp", "web3", "api"],
          "input": {
            "type": "http",
            "method": "POST",
            "bodyType": "json"
          },
          "output": {
            "type": "json"
          }
        },
        "requestBody": {
          "$ref": "#/components/requestBodies/X402TransactionDecodeRequest"
        },
        "responses": {
          "200": {
            "description": "Paid transaction decode.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402TransactionDecodeSuccess"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "503": {
            "$ref": "#/components/responses/X402Unavailable"
          }
        }
      }
    },
    "/api/x402/saved-report": {
      "post": {
        "tags": ["x402"],
        "operationId": "postX402SavedReport",
        "summary": "Create a paid saved report",
        "description": "Generates and saves a paid report for a public wallet address or transaction hash. Unpaid requests return 402 x402 payment requirements.",
        "security": [
          {
            "x402Payment": []
          }
        ],
        "x-x402": {
          "resource_id": "saved_report",
          "discoverable": true,
          "seller_provider": "Blockchain Money Map",
          "price": {
            "amount": "1.00",
            "currency": "USDC",
            "network": "base"
          },
          "discovery_url": "https://api.blockchainmoneymap.com/.well-known/x402.json",
          "payment_header": "X-PAYMENT",
          "safety": "Public wallet or transaction research report only. No wallet connection, private keys, signing, trading, or financial/legal/tax/investment/compliance advice."
        },
        "x-bazaar": {
          "serviceName": "Blockchain Money Map",
          "tags": ["wallet-intelligence", "x402", "mcp", "web3", "api"],
          "input": {
            "type": "http",
            "method": "POST",
            "bodyType": "json"
          },
          "output": {
            "type": "json"
          }
        },
        "requestBody": {
          "$ref": "#/components/requestBodies/X402SavedReportRequest"
        },
        "responses": {
          "200": {
            "description": "Paid saved report result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402SavedReportSuccess"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "503": {
            "$ref": "#/components/responses/X402Unavailable"
          }
        }
      }
    },
    "/api/blockchain-audit": {
      "post": {
        "tags": ["Public Beta"],
        "operationId": "postBlockchainAudit",
        "summary": "Generate a public beta blockchain report",
        "description": "Generates a human-facing public beta report from a public EVM wallet, contract, or transaction hash.",
        "requestBody": {
          "$ref": "#/components/requestBodies/BlockchainAuditRequest"
        },
        "responses": {
          "200": {
            "description": "Generated report and source data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockchainAuditGenerateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      },
      "put": {
        "tags": ["Public Beta"],
        "operationId": "putBlockchainAuditSave",
        "summary": "Save a generated public beta report",
        "description": "Saves a generated report and returns an unlisted saved report id.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["report", "auditData"],
                "properties": {
                  "report": {
                    "$ref": "#/components/schemas/BlockchainAuditReport"
                  },
                  "auditData": {
                    "$ref": "#/components/schemas/BlockchainAuditData"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved report metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SaveReportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/blockchain-audit/email": {
      "post": {
        "tags": ["Public Beta"],
        "operationId": "postBlockchainAuditEmail",
        "summary": "Request email delivery for a generated report",
        "description": "Records an email report request and attempts configured email delivery. Report generation is not affected if delivery fails.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["report", "auditData"],
                "properties": {
                  "report": {
                    "$ref": "#/components/schemas/BlockchainAuditReport"
                  },
                  "auditData": {
                    "$ref": "#/components/schemas/BlockchainAuditData"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email request result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailReportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/blockchain-audit/manual-request": {
      "post": {
        "tags": ["Public Beta"],
        "operationId": "postManualAuditRequest",
        "summary": "Record a manual audit request",
        "description": "Records a manual follow-up request for a public report target.",
        "requestBody": {
          "$ref": "#/components/requestBodies/ManualAuditRequest"
        },
        "responses": {
          "200": {
            "description": "Manual audit request recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualAuditRequestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/blockchain-audit/watch-request": {
      "post": {
        "tags": ["Public Beta"],
        "operationId": "postWatchlistRequest",
        "summary": "Record a watchlist request",
        "description": "Records a beta watchlist request. This does not start real-time monitoring automatically.",
        "requestBody": {
          "$ref": "#/components/requestBodies/WatchlistRequest"
        },
        "responses": {
          "200": {
            "description": "Watchlist request recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistRequestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/blockchain-audit/events": {
      "post": {
        "tags": ["Analytics"],
        "operationId": "postBlockchainAuditEvent",
        "summary": "Track a public beta client event",
        "description": "Records sanitized public beta client events. This endpoint is for first-party product telemetry.",
        "requestBody": {
          "$ref": "#/components/requestBodies/ClientEvent"
        },
        "responses": {
          "200": {
            "description": "Event accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402Payment": {
        "type": "apiKey",
        "in": "header",
        "name": "X-PAYMENT",
        "description": "Signed x402 payment payload. Never send private keys, seed phrases, or wallet secrets."
      }
    },
    "headers": {
      "PaymentRequired": {
        "description": "Encoded x402 payment requirements.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Seconds until the client may retry.",
        "schema": {
          "type": "string"
        }
      }
    },
    "requestBodies": {
      "BlockchainAuditRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BlockchainAuditInput"
            },
            "examples": {
              "wallet": {
                "summary": "Wallet report",
                "value": {
                  "auditMode": "address",
                  "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
                  "network": "ethereum",
                  "reportType": "wallet_money_map"
                }
              },
              "transaction": {
                "summary": "Transaction hash report",
                "value": {
                  "auditMode": "transaction",
                  "transactionHash": "0x146a6dbf59e6fba31cae9fe447a0516c47a4bd12d1c3086b9ce5e4c041d41727",
                  "network": "base",
                  "reportType": "wallet_money_map"
                }
              }
            }
          }
        }
      },
      "X402AddressAuditRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/X402AddressAuditInput"
            }
          }
        }
      },
      "X402TransactionDecodeRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/X402TransactionDecodeInput"
            }
          }
        }
      },
      "X402SavedReportRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/X402AddressAuditInput"
                },
                {
                  "$ref": "#/components/schemas/X402TransactionDecodeInput"
                }
              ]
            }
          }
        }
      },
      "ManualAuditRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ManualAuditRequestInput"
            }
          }
        }
      },
      "WatchlistRequest": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/WatchlistRequestInput"
            }
          }
        }
      },
      "ClientEvent": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ClientEventInput"
            }
          }
        }
      }
    },
    "responses": {
      "AgentDiscoveryDisabled": {
        "description": "Agent discovery is disabled.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ValidationError": {
        "description": "Validation error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ServerError": {
        "description": "Server error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NotFoundResponse"
            }
          }
        }
      },
      "JsonRpcClientError": {
        "description": "JSON-RPC request error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JsonRpcErrorResponse"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "x402 payment is required for this paid agent tool.",
        "headers": {
          "PAYMENT-REQUIRED": {
            "$ref": "#/components/headers/PaymentRequired"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentRequiredResponse"
            }
          }
        }
      },
      "X402Unavailable": {
        "description": "x402 is disabled, misconfigured, or unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "SupportedNetwork": {
        "type": "string",
        "enum": ["ethereum", "base", "polygon", "arbitrum", "optimism"]
      },
      "ReportType": {
        "type": "string",
        "enum": ["wallet_money_map", "contract_project_risk_snapshot", "stablecoin_creator_business_setup"]
      },
      "AuditMode": {
        "type": "string",
        "enum": ["address", "transaction"]
      },
      "SourceAttribution": {
        "type": "object",
        "properties": {
          "utmSource": {
            "type": "string",
            "maxLength": 120
          },
          "utmMedium": {
            "type": "string",
            "maxLength": 120
          },
          "utmCampaign": {
            "type": "string",
            "maxLength": 160
          },
          "utmContent": {
            "type": "string",
            "maxLength": 160
          },
          "referrer": {
            "type": "string",
            "maxLength": 500
          }
        },
        "additionalProperties": false
      },
      "BlockchainAuditInput": {
        "type": "object",
        "required": ["network", "reportType"],
        "oneOf": [
          {
            "required": ["address"]
          },
          {
            "required": ["transactionHash"]
          }
        ],
        "properties": {
          "auditMode": {
            "$ref": "#/components/schemas/AuditMode"
          },
          "address": {
            "type": "string",
            "description": "Public EVM address for address mode, or transaction hash fallback for transaction mode."
          },
          "transactionHash": {
            "type": "string",
            "description": "Public EVM transaction hash for transaction mode."
          },
          "network": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "reportType": {
            "$ref": "#/components/schemas/ReportType"
          },
          "notes": {
            "type": "string",
            "maxLength": 1200
          },
          "leadName": {
            "type": "string",
            "maxLength": 120
          },
          "leadEmail": {
            "type": "string",
            "format": "email",
            "maxLength": 160
          },
          "businessName": {
            "type": "string",
            "maxLength": 160
          },
          "wantsHelp": {
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/SourceAttribution"
          }
        },
        "additionalProperties": false
      },
      "X402AddressAuditInput": {
        "type": "object",
        "required": ["address"],
        "properties": {
          "address": {
            "type": "string",
            "description": "Public EVM wallet or contract address."
          },
          "chain": {
            "type": "string",
            "description": "Supported chain alias such as base, ethereum, polygon, arbitrum, or optimism."
          },
          "network": {
            "type": "string",
            "description": "Alias for chain."
          },
          "reportType": {
            "$ref": "#/components/schemas/ReportType"
          },
          "notes": {
            "type": "string",
            "maxLength": 1200
          }
        },
        "additionalProperties": true
      },
      "X402TransactionDecodeInput": {
        "type": "object",
        "required": ["transactionHash"],
        "properties": {
          "transactionHash": {
            "type": "string",
            "description": "Public EVM transaction hash."
          },
          "hash": {
            "type": "string",
            "description": "Alias for transactionHash."
          },
          "address": {
            "type": "string",
            "description": "Fallback alias accepted by the existing route."
          },
          "chain": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "reportType": {
            "$ref": "#/components/schemas/ReportType"
          },
          "notes": {
            "type": "string",
            "maxLength": 1200
          }
        },
        "additionalProperties": true
      },
      "AddressSummary": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "addressType": {
            "type": "string",
            "enum": ["wallet", "contract", "unknown"]
          },
          "network": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "chainId": {
            "type": "integer"
          },
          "nativeBalance": {
            "type": "string"
          },
          "transactionCount": {
            "type": "integer"
          },
          "isContract": {
            "type": "boolean"
          },
          "isVerifiedContract": {
            "type": "boolean"
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "confidence": {
            "type": "string",
            "enum": ["low", "medium", "high"]
          }
        },
        "additionalProperties": true
      },
      "BlockchainAuditMetadata": {
        "type": "object",
        "properties": {
          "dataSourceStatus": {
            "type": "string",
            "enum": ["Live", "Demo", "Partial"]
          },
          "reportConfidence": {
            "type": "string",
            "enum": ["High", "Medium", "Low"]
          },
          "dataNotes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cached": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "BlockchainAuditReportSection": {
        "type": "object",
        "required": ["id", "title", "body"],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "BlockchainAuditReport": {
        "type": "object",
        "required": ["input", "mode", "provider", "metadata", "generatedAt", "sections", "plainText", "disclaimer"],
        "properties": {
          "id": {
            "type": "string"
          },
          "input": {
            "$ref": "#/components/schemas/BlockchainAuditInput"
          },
          "mode": {
            "type": "string",
            "enum": ["live", "demo", "partial"]
          },
          "provider": {
            "type": "string",
            "enum": ["blockscout", "fallback"]
          },
          "metadata": {
            "$ref": "#/components/schemas/BlockchainAuditMetadata"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockchainAuditReportSection"
            }
          },
          "plainText": {
            "type": "string"
          },
          "disclaimer": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "BlockchainAuditData": {
        "type": "object",
        "required": ["input", "networkLabel", "chainId", "mode", "provider", "metadata", "addressSummary", "generatedAt"],
        "properties": {
          "input": {
            "$ref": "#/components/schemas/BlockchainAuditInput"
          },
          "networkLabel": {
            "type": "string"
          },
          "chainId": {
            "type": "integer"
          },
          "mode": {
            "type": "string",
            "enum": ["live", "demo", "partial"]
          },
          "provider": {
            "type": "string",
            "enum": ["blockscout", "fallback"]
          },
          "metadata": {
            "$ref": "#/components/schemas/BlockchainAuditMetadata"
          },
          "addressSummary": {
            "$ref": "#/components/schemas/AddressSummary"
          },
          "recentTransactions": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "tokenHoldings": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "nftHoldings": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "assetExposure": {
            "type": "object",
            "additionalProperties": true
          },
          "transactionDetail": {
            "type": ["object", "null"],
            "additionalProperties": true
          },
          "flowAnalysis": {
            "type": "object",
            "additionalProperties": true
          },
          "riskFlags": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "opportunitySignals": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "BlockchainAuditGenerateResponse": {
        "type": "object",
        "required": ["report", "auditData", "cached"],
        "properties": {
          "report": {
            "$ref": "#/components/schemas/BlockchainAuditReport"
          },
          "auditData": {
            "$ref": "#/components/schemas/BlockchainAuditData"
          },
          "cached": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SaveReportResponse": {
        "type": "object",
        "required": ["id", "savedAt", "persistence"],
        "properties": {
          "id": {
            "type": "string"
          },
          "savedAt": {
            "type": "string",
            "format": "date-time"
          },
          "persistence": {
            "type": "string",
            "enum": ["file", "memory", "supabase"]
          }
        },
        "additionalProperties": false
      },
      "EmailReportResponse": {
        "type": "object",
        "required": ["reportId", "delivery"],
        "properties": {
          "reportId": {
            "type": "string"
          },
          "delivery": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": false
      },
      "ManualAuditRequestInput": {
        "type": "object",
        "required": ["address", "leadName", "leadEmail", "reviewRequest"],
        "properties": {
          "reportId": {
            "type": "string"
          },
          "auditMode": {
            "$ref": "#/components/schemas/AuditMode"
          },
          "address": {
            "type": "string"
          },
          "network": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "reportType": {
            "$ref": "#/components/schemas/ReportType"
          },
          "leadName": {
            "type": "string",
            "maxLength": 120
          },
          "leadEmail": {
            "type": "string",
            "format": "email",
            "maxLength": 160
          },
          "businessName": {
            "type": "string",
            "maxLength": 160
          },
          "reviewRequest": {
            "type": "string",
            "maxLength": 2000
          },
          "urgency": {
            "type": "string",
            "maxLength": 120
          },
          "source": {
            "$ref": "#/components/schemas/SourceAttribution"
          }
        },
        "additionalProperties": false
      },
      "WatchlistRequestInput": {
        "type": "object",
        "required": ["address", "leadName", "leadEmail", "watchReason"],
        "properties": {
          "reportId": {
            "type": "string"
          },
          "auditMode": {
            "$ref": "#/components/schemas/AuditMode"
          },
          "address": {
            "type": "string"
          },
          "network": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "reportType": {
            "$ref": "#/components/schemas/ReportType"
          },
          "leadName": {
            "type": "string",
            "maxLength": 120
          },
          "leadEmail": {
            "type": "string",
            "format": "email",
            "maxLength": 160
          },
          "businessName": {
            "type": "string",
            "maxLength": 160
          },
          "watchReason": {
            "type": "string",
            "maxLength": 1600
          },
          "alertPreference": {
            "type": "string",
            "maxLength": 160
          },
          "source": {
            "$ref": "#/components/schemas/SourceAttribution"
          }
        },
        "additionalProperties": false
      },
      "ManualAuditRequestResponse": {
        "type": "object",
        "required": ["ok", "requestId", "message"],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "requestId": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "WatchlistRequestResponse": {
        "type": "object",
        "required": ["ok", "requestId", "message"],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "requestId": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ClientEventInput": {
        "type": "object",
        "required": ["eventName"],
        "properties": {
          "eventName": {
            "type": "string"
          },
          "reportId": {
            "type": "string"
          },
          "network": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "reportType": {
            "$ref": "#/components/schemas/ReportType"
          },
          "address": {
            "type": "string"
          },
          "addressType": {
            "type": "string",
            "enum": ["wallet", "contract", "unknown"]
          },
          "fallbackMode": {
            "type": "string",
            "enum": ["live", "partial", "demo"]
          },
          "feedbackText": {
            "type": "string",
            "maxLength": 1200
          },
          "feedbackUseful": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "OkResponse": {
        "type": "object",
        "required": ["ok"],
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "ErrorResponse": {
        "type": "object",
        "required": ["error", "code"],
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "NotFoundResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "Price": {
        "type": "object",
        "required": ["amount", "currency", "network"],
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "example": "USDC"
          },
          "network": {
            "type": "string",
            "example": "base"
          },
          "x402Network": {
            "type": "string",
            "example": "eip155:8453"
          }
        },
        "additionalProperties": true
      },
      "PaymentRequiredResponse": {
        "type": "object",
        "required": ["error", "message", "x402", "paymentRequired"],
        "properties": {
          "error": {
            "type": "string",
            "enum": ["payment_required"]
          },
          "message": {
            "type": "string"
          },
          "x402": {
            "type": "object",
            "required": ["network", "caip2Network", "currency", "amount", "resource"],
            "properties": {
              "network": {
                "type": "string"
              },
              "caip2Network": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "amount": {
                "type": "string"
              },
              "payTo": {
                "type": "string"
              },
              "resource": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "paymentRequired": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "X402WalletAuditSuccess": {
        "type": "object",
        "required": ["ok", "tool", "chain", "address", "pricePaid", "result", "metadata"],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "tool": {
            "type": "string",
            "enum": ["wallet_audit"]
          },
          "chain": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "address": {
            "type": "string"
          },
          "pricePaid": {
            "$ref": "#/components/schemas/Price"
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          },
          "metadata": {
            "$ref": "#/components/schemas/X402ResponseMetadata"
          }
        },
        "additionalProperties": true
      },
      "X402DeepWalletReportSuccess": {
        "type": "object",
        "required": ["ok", "tool", "chain", "address", "pricePaid", "result", "metadata"],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "tool": {
            "type": "string",
            "enum": ["deep_wallet_report"]
          },
          "chain": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "address": {
            "type": "string"
          },
          "pricePaid": {
            "$ref": "#/components/schemas/Price"
          },
          "result": {
            "type": "object",
            "properties": {
              "report": {
                "$ref": "#/components/schemas/BlockchainAuditReport"
              },
              "structuredSummary": {
                "type": "object",
                "additionalProperties": true
              },
              "savedReportId": {
                "type": "string"
              },
              "savedReportUrl": {
                "type": "string",
                "format": "uri"
              }
            },
            "additionalProperties": true
          },
          "metadata": {
            "$ref": "#/components/schemas/X402ResponseMetadata"
          }
        },
        "additionalProperties": true
      },
      "X402TransactionDecodeSuccess": {
        "type": "object",
        "required": ["ok", "tool", "chain", "transactionHash", "pricePaid", "result", "metadata"],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "tool": {
            "type": "string",
            "enum": ["tx_decode"]
          },
          "chain": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "transactionHash": {
            "type": "string"
          },
          "pricePaid": {
            "$ref": "#/components/schemas/Price"
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          },
          "metadata": {
            "$ref": "#/components/schemas/X402ResponseMetadata"
          }
        },
        "additionalProperties": true
      },
      "X402SavedReportSuccess": {
        "type": "object",
        "required": ["ok", "tool", "chain", "target", "pricePaid", "result", "metadata"],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "tool": {
            "type": "string",
            "enum": ["saved_report"]
          },
          "chain": {
            "$ref": "#/components/schemas/SupportedNetwork"
          },
          "target": {
            "type": "string"
          },
          "pricePaid": {
            "$ref": "#/components/schemas/Price"
          },
          "result": {
            "type": "object",
            "required": ["reportId", "savedReportUrl", "auditMode", "report", "preview"],
            "properties": {
              "reportId": {
                "type": "string"
              },
              "savedReportUrl": {
                "type": "string",
                "format": "uri"
              },
              "auditMode": {
                "$ref": "#/components/schemas/AuditMode"
              },
              "report": {
                "$ref": "#/components/schemas/BlockchainAuditReport"
              },
              "preview": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          },
          "metadata": {
            "$ref": "#/components/schemas/X402ResponseMetadata"
          }
        },
        "additionalProperties": true
      },
      "X402ResponseMetadata": {
        "type": "object",
        "required": ["generatedAt", "requestId", "paymentStatus"],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "requestId": {
            "type": "string"
          },
          "paymentStatus": {
            "type": "string",
            "enum": ["paid", "bypassed"]
          }
        },
        "additionalProperties": true
      },
      "JsonRpcRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "type": ["string", "number", "null"]
          },
          "method": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": ["jsonrpc", "method"],
        "additionalProperties": true
      },
      "JsonRpcSuccessResponse": {
        "type": "object",
        "required": ["jsonrpc", "id", "result"],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "type": ["string", "number", "null"]
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "JsonRpcErrorResponse": {
        "type": "object",
        "required": ["jsonrpc", "id", "error"],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "type": ["string", "number", "null"]
          },
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "data": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "McpDiscoveryDocument": {
        "type": "object",
        "required": ["name", "manifest", "x402Manifest", "endpoint"],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "humanBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "agentBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "apiBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "manifest": {
            "type": "string",
            "format": "uri"
          },
          "x402Manifest": {
            "type": "string",
            "format": "uri"
          },
          "endpoint": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": true
      },
      "McpMetadata": {
        "type": "object",
        "required": ["ok", "name", "version", "protocolVersion", "transport", "endpoint", "tools"],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "protocolVersion": {
            "type": "string"
          },
          "transport": {
            "type": "string"
          },
          "endpoint": {
            "type": "string",
            "format": "uri"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          },
          "x402Manifest": {
            "type": "string",
            "format": "uri"
          },
          "agentManifest": {
            "type": "string",
            "format": "uri"
          },
          "enabled": {
            "type": "boolean"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpTool"
            }
          }
        },
        "additionalProperties": true
      },
      "McpDisabledStub": {
        "type": "object",
        "required": ["ok", "code", "message", "mcpEnabled", "enableWith"],
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [false]
          },
          "code": {
            "type": "string",
            "enum": ["mcp_not_fully_enabled"]
          },
          "message": {
            "type": "string"
          },
          "mcpEnabled": {
            "type": "boolean",
            "enum": [false]
          },
          "enableWith": {
            "type": "string"
          },
          "plannedTools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpTool"
            }
          },
          "httpAgentManifest": {
            "type": "string",
            "format": "uri"
          },
          "x402Manifest": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": true
      },
      "McpTool": {
        "type": "object",
        "required": ["name", "title", "description", "inputSchema"],
        "properties": {
          "name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "type": "object",
            "additionalProperties": true
          },
          "outputSchema": {
            "type": "object",
            "additionalProperties": true
          },
          "annotations": {
            "type": "object",
            "additionalProperties": true
          },
          "_meta": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "AgentManifest": {
        "type": "object",
        "required": ["name", "discovery", "tools"],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "humanBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "agentBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "apiBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "discovery": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTool"
            }
          },
          "safety": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "AgentTool": {
        "type": "object",
        "required": ["id", "name", "method", "endpoint"],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "endpoint": {
            "type": "string",
            "format": "uri"
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "x402Required": {
            "type": "boolean"
          },
          "inputSchema": {
            "type": "object",
            "additionalProperties": true
          },
          "outputSchema": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "AiDiscoveryDocument": {
        "type": "object",
        "required": ["name", "discovery", "tools"],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "humanBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "agentBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "apiBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "discovery": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTool"
            }
          },
          "safety": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "X402DiscoveryDocument": {
        "type": "object",
        "required": ["name", "baseUrl", "x402", "resources"],
        "properties": {
          "name": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string",
            "format": "uri"
          },
          "humanBaseUrl": {
            "type": "string",
            "format": "uri"
          },
          "x402": {
            "type": "object",
            "required": ["enabled"],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "network": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "facilitator": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/X402Resource"
            }
          },
          "safety": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "X402Resource": {
        "type": "object",
        "required": ["id", "name", "method", "endpoint"],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "endpoint": {
            "type": "string",
            "format": "uri"
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          }
        },
        "additionalProperties": true
      },
      "HealthResponse": {
        "type": "object",
        "required": ["ok", "app", "timestamp", "services"],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "app": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "services": {
            "type": "object",
            "required": ["supabase", "blockscout", "openai", "adminAccess", "emailDelivery", "x402", "x402Receiver", "agentDiscovery", "mcp"],
            "properties": {
              "supabase": {
                "type": "boolean"
              },
              "blockscout": {
                "type": "boolean"
              },
              "openai": {
                "type": "boolean"
              },
              "adminAccess": {
                "type": "boolean"
              },
              "emailDelivery": {
                "type": "boolean"
              },
              "x402": {
                "type": "boolean"
              },
              "x402Receiver": {
                "type": "boolean"
              },
              "agentDiscovery": {
                "type": "boolean"
              },
              "mcp": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": true
      }
    }
  }
}
