{
  "openapi": "3.1.0",
  "info": {
    "title": "Nirobha Digital Commercial & Agent API",
    "version": "1.0.0",
    "description": "Official machine-readable REST and MCP API interfaces for Nirobha Digital — India's premier web engineering and performance digital marketing agency based in Siliguri. Enables autonomous AI agents to discover service capabilities, retrieve transparent quotation pricing, and submit commercial project proposals.",
    "contact": {
      "name": "Nirobha Digital Technical Desk",
      "url": "https://nirobhadigital.com/contact/",
      "email": "info@nirobhadigital.com"
    },
    "license": {
      "name": "Proprietary / Open Discovery",
      "url": "https://nirobhadigital.com/legal/terms/"
    }
  },
  "servers": [
    {
      "url": "https://nirobhadigital.com",
      "description": "Production Edge Server"
    }
  ],
  "paths": {
    "/api/mcp/": {
      "get": {
        "summary": "MCP Server Health & Tool Manifest",
        "description": "Returns operational status and registered Model Context Protocol tools for autonomous AI agent clients.",
        "responses": {
          "200": {
            "description": "Successful health check and tool registry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpHealthResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "MCP JSON-RPC 2.0 Dispatcher",
        "description": "Executes MCP JSON-RPC protocol requests (initialize, tools/list, tools/call, ping).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          }
        }
      }
    },
    "/products-feed.json": {
      "get": {
        "summary": "Service Packages & Pricing Catalog Feed",
        "description": "Retrieves the complete machine-readable product catalog with deliverables, prices in INR, and turnarounds.",
        "responses": {
          "200": {
            "description": "Product catalog feed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCatalogFeed"
                }
              }
            }
          }
        }
      }
    },
    "/api/quote.php": {
      "post": {
        "summary": "Commercial Project Inquiry & Lead Intake",
        "description": "Submits a commercial project inquiry or custom quote request directly to Nirobha Digital technical leads.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Inquiry accepted and reference assigned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "message": { "type": "string" },
                    "reference_id": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "McpHealthResponse": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "example": "healthy" },
          "protocol": { "type": "string", "example": "mcp" },
          "protocolVersion": { "type": "string", "example": "2025-06-18" },
          "endpoint": { "type": "string", "example": "https://nirobhadigital.com/api/mcp/" }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method", "id"],
        "properties": {
          "jsonrpc": { "type": "string", "example": "2.0" },
          "method": { "type": "string", "example": "tools/list" },
          "params": { "type": "object" },
          "id": { "oneOf": [{ "type": "string" }, { "type": "integer" }] }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc", "id"],
        "properties": {
          "jsonrpc": { "type": "string", "example": "2.0" },
          "result": { "type": "object" },
          "error": { "type": "object" },
          "id": { "oneOf": [{ "type": "string" }, { "type": "integer" }] }
        }
      },
      "QuoteRequest": {
        "type": "object",
        "required": ["name", "phone", "service"],
        "properties": {
          "name": { "type": "string", "description": "Client or company name" },
          "phone": { "type": "string", "description": "10-digit mobile number" },
          "email": { "type": "string", "format": "email", "description": "Contact email" },
          "service": { "type": "string", "description": "Service silo" },
          "message": { "type": "string", "description": "Project requirements" }
        }
      },
      "ProductCatalogFeed": {
        "type": "object",
        "properties": {
          "catalog_name": { "type": "string" },
          "currency": { "type": "string", "example": "INR" },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "title": { "type": "string" },
                "price": { "type": "number" },
                "price_currency": { "type": "string" }
              }
            }
          }
        }
      }
    }
  }
}
