{
  "openapi": "3.1.0",
  "info": {
    "title": "Rooster Agents — agent API",
    "version": "1.0.0",
    "summary": "Discover, read and book verified real-world businesses; buy AI-visibility analysis per call.",
    "description": "Open discovery + booking handoff (no auth) and pay-per-call analysis (x402, no account). See /SKILL.md for agent instructions and /auth.md for authentication.",
    "contact": {
      "name": "Rooster Agents",
      "email": "rudy@roosteragents.ai",
      "url": "https://roosteragents.ai/"
    }
  },
  "servers": [
    {
      "url": "https://roosteragents.ai"
    },
    {
      "url": "https://rooster-meter.roosteragents.workers.dev",
      "description": "THE METER (metered analysis)"
    }
  ],
  "paths": {
    "/mcp": {
      "post": {
        "operationId": "mcpCall",
        "summary": "MCP JSON-RPC endpoint (initialize / tools/list / tools/call)",
        "servers": [
          {
            "url": "https://roosteragents.ai"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "type": [
                      "integer",
                      "string"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "initialize",
                      "tools/list",
                      "tools/call"
                    ]
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {}
        ]
      }
    },
    "/gateway/directory.json": {
      "get": {
        "operationId": "listBusinesses",
        "summary": "Verified bookable business directory",
        "responses": {
          "200": {
            "description": "Directory",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {}
        ]
      }
    },
    "/gateway/businesses/{id}.json": {
      "get": {
        "operationId": "getBusiness",
        "summary": "One business: schema.org @graph, agent manifest, booking action",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Business record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not listed"
          }
        },
        "security": [
          {}
        ]
      }
    },
    "/v1/agent-readiness": {
      "get": {
        "operationId": "agent_readiness",
        "summary": "Agent-readiness score",
        "description": "Score any domain 0-100 on the four agentic-web gates (allowed in, discoverable, readable, callable) with the ranked list of fixes.",
        "servers": [
          {
            "url": "https://rooster-meter.roosteragents.workers.dev"
          }
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hostname of the business to analyse"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Analysis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input — refused BEFORE the paywall, never charged"
          },
          "402": {
            "description": "Payment required — x402 challenge; replay with X-PAYMENT"
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocol": "x402",
          "amount": "$0.02",
          "currency": "USDC",
          "network": "base-sepolia",
          "status": "testnet-preview",
          "discovery": "https://roosteragents.ai/.well-known/x402"
        }
      }
    },
    "/v1/scan": {
      "get": {
        "operationId": "ai_visibility_scan",
        "summary": "AI visibility scan",
        "description": "Ask whether the AI answer engines actually recommend a business, what it scores against its real local rivals, and exactly what to fix first.",
        "servers": [
          {
            "url": "https://rooster-meter.roosteragents.workers.dev"
          }
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hostname of the business to analyse"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Analysis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input — refused BEFORE the paywall, never charged"
          },
          "402": {
            "description": "Payment required — x402 challenge; replay with X-PAYMENT"
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocol": "x402",
          "amount": "$0.25",
          "currency": "USDC",
          "network": "base-sepolia",
          "status": "testnet-preview",
          "discovery": "https://roosteragents.ai/.well-known/x402"
        }
      }
    },
    "/v1/scan/full": {
      "get": {
        "operationId": "ai_visibility_scan_full",
        "summary": "AI visibility scan (full)",
        "description": "The deep version: multi-prompt answer-engine probing, citation sources, rival share-of-answer and a prioritised remediation plan.",
        "servers": [
          {
            "url": "https://rooster-meter.roosteragents.workers.dev"
          }
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hostname of the business to analyse"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Analysis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input — refused BEFORE the paywall, never charged"
          },
          "402": {
            "description": "Payment required — x402 challenge; replay with X-PAYMENT"
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocol": "x402",
          "amount": "$1.00",
          "currency": "USDC",
          "network": "base-sepolia",
          "status": "testnet-preview",
          "discovery": "https://roosteragents.ai/.well-known/x402"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "http",
        "scheme": "x402",
        "description": "Pay-per-call USDC settlement. 402 challenge, replay with X-PAYMENT."
      }
    }
  },
  "externalDocs": {
    "url": "https://roosteragents.ai/llms-full.txt",
    "description": "Full agent reference"
  }
}
