{
  "openapi": "3.1.0",
  "info": {
    "title": "Hoffman Water Public Agent API",
    "version": "1.0.0",
    "summary": "Read-only reference data about Hoffman Water LLC, an engineer-led industrial water treatment company in Urbana, Ohio.",
    "description": "A small, public, read-only API that lets agents answer questions about Hoffman Water's services, service areas, published FAQs and company facts without scraping HTML. Every response is generated from the same source content as the website, so the API and the pages cannot disagree. No authentication is required; see https://www.hoffmanwater.com/auth.md.",
    "contact": {
      "name": "Hoffman Water LLC",
      "email": "doug.hoffman@hoffmanwater.com",
      "url": "https://www.hoffmanwater.com/contact.html"
    },
    "license": {
      "name": "Public reference data, attribution requested",
      "url": "https://www.hoffmanwater.com/terms.html"
    }
  },
  "servers": [{ "url": "https://www.hoffmanwater.com", "description": "Production" }],
  "externalDocs": {
    "description": "Site summary for language models",
    "url": "https://www.hoffmanwater.com/llms.txt"
  },
  "x-payment-info": {
    "model": "free",
    "description": "Every operation in this API is free to call. No payment rail is required or accepted, and no operation will ever return HTTP 402.",
    "defaultPrice": { "amount": "0", "currency": "USD", "unit": "request" }
  },
  "paths": {
    "/api/company": {
      "get": {
        "operationId": "getCompany",
        "summary": "Verified company facts",
        "description": "Legal name, phone, email, street address, founding, industries served, emergency-response policy and the Hoffman Soft Water pretreatment division.",
        "tags": ["company"],
        "x-payment-info": { "price": { "amount": "0", "currency": "USD", "unit": "request" } },
        "responses": {
          "200": {
            "description": "Company record",
            "content": {
              "application/json": { "schema": { "$ref": "#/components/schemas/Company" } }
            }
          }
        }
      }
    },
    "/api/services": {
      "get": {
        "operationId": "listServices",
        "summary": "List services, or fetch one by id",
        "description": "Without `id`, returns all six treatment services. With `id`, returns that service plus its published FAQs.",
        "tags": ["services"],
        "x-payment-info": { "price": { "amount": "0", "currency": "USD", "unit": "request" } },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Service identifier.",
            "schema": {
              "type": "string",
              "enum": [
                "boiler-treatment",
                "cooling-tower-treatment",
                "closed-loop-treatment",
                "wastewater",
                "paint-detackification",
                "solid-chemistry"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service list or a single service",
            "content": { "application/json": { "schema": { "type": "object" } } }
          },
          "404": {
            "description": "No service with that id",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
          }
        }
      }
    },
    "/api/service-areas": {
      "get": {
        "operationId": "listServiceAreas",
        "summary": "Cities and states served",
        "description": "Ohio plus bordering Kentucky, Indiana and West Virginia, with the page covering each.",
        "tags": ["company"],
        "x-payment-info": { "price": { "amount": "0", "currency": "USD", "unit": "request" } },
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "Two-letter state code filter, e.g. OH.",
            "schema": { "type": "string", "enum": ["OH", "KY", "IN", "WV"] }
          }
        ],
        "responses": {
          "200": {
            "description": "Service areas",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/api/faq": {
      "get": {
        "operationId": "searchFaq",
        "summary": "Published question-and-answer pairs",
        "description": "Returns the FAQs published across the site verbatim, each with its source URL. Filter by free text or by page topic.",
        "tags": ["content"],
        "x-payment-info": { "price": { "amount": "0", "currency": "USD", "unit": "request" } },
        "parameters": [
          { "name": "q", "in": "query", "required": false, "description": "Free-text filter; all terms must match.", "schema": { "type": "string" } },
          { "name": "topic", "in": "query", "required": false, "description": "Page slug, e.g. boiler-treatment.", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Matching FAQs",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "operationId": "searchSite",
        "summary": "Search all site content",
        "description": "Ranked search across services, service areas, FAQs and page descriptions. Use this when the right page is unknown.",
        "tags": ["content"],
        "x-payment-info": { "price": { "amount": "0", "currency": "USD", "unit": "request" } },
        "parameters": [
          { "name": "q", "in": "query", "required": true, "description": "Search terms.", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Ranked results",
            "content": { "application/json": { "schema": { "type": "object" } } }
          },
          "400": {
            "description": "Missing q parameter",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
          }
        }
      }
    },
    "/api/pages": {
      "get": {
        "operationId": "listPages",
        "summary": "Index of pages and their Markdown twins",
        "description": "Every public page with its HTML URL and the URL of its Markdown twin.",
        "tags": ["content"],
        "x-payment-info": { "price": { "amount": "0", "currency": "USD", "unit": "request" } },
        "responses": {
          "200": {
            "description": "Page index",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/api/mcp": {
      "post": {
        "operationId": "mcpJsonRpc",
        "summary": "MCP endpoint (JSON-RPC 2.0, Streamable HTTP)",
        "description": "Stateless Model Context Protocol server exposing the same data as seven tools. See /.well-known/mcp/server-card.json.",
        "tags": ["mcp"],
        "x-payment-info": { "price": { "amount": "0", "currency": "USD", "unit": "request" } },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["jsonrpc", "method"],
                "properties": {
                  "jsonrpc": { "type": "string", "const": "2.0" },
                  "id": { "type": ["string", "integer"] },
                  "method": { "type": "string", "examples": ["initialize", "tools/list", "tools/call"] },
                  "params": { "type": "object" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "JSON-RPC result", "content": { "application/json": { "schema": { "type": "object" } } } },
          "202": { "description": "Notification accepted, no body" },
          "405": { "description": "GET is not supported; this endpoint is POST-only" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Company": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "legalName": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "telephone": { "type": "string" },
          "email": { "type": "string", "format": "email" },
          "address": {
            "type": "object",
            "properties": {
              "street": { "type": "string" },
              "locality": { "type": "string" },
              "region": { "type": "string" },
              "postalCode": { "type": "string" },
              "country": { "type": "string" }
            }
          },
          "foundingDate": { "type": "string" },
          "inTheFieldSince": { "type": "string" },
          "founder": { "type": "string" },
          "emergencyService": { "type": "string" },
          "industriesServed": { "type": "array", "items": { "type": "string" } },
          "sameAs": { "type": "array", "items": { "type": "string", "format": "uri" } }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": { "type": "string" },
          "message": { "type": "string" }
        }
      }
    }
  },
  "tags": [
    { "name": "company", "description": "Verified facts about the business" },
    { "name": "services", "description": "Water treatment service catalogue" },
    { "name": "content", "description": "Site content, search and Markdown twins" },
    { "name": "mcp", "description": "Model Context Protocol endpoint" }
  ]
}
