{
  "openapi": "3.1.0",
  "info": {
    "title": "What's Cooking MCP",
    "version": "1.0.0",
    "description": "Model Context Protocol server for What's Cooking. Ask Gusto what to cook tonight with what you have. JSON-RPC 2.0 over streamable HTTP; stateless; no authentication.",
    "contact": {
      "email": "partnership@thehowtonetwork.com",
      "url": "https://whatscooking.guide/For%20Agents"
    }
  },
  "servers": [
    {
      "url": "https://whatscooking.guide"
    }
  ],
  "paths": {
    "/mcp-server": {
      "post": {
        "summary": "Send an MCP JSON-RPC message",
        "description": "Methods: initialize, ping, tools/list, tools/call. Tools: whats_for_dinner, browse_explore, get_explore_recipe.",
        "operationId": "mcpRpc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/call",
                "params": {
                  "name": "whats_for_dinner",
                  "arguments": {
                    "have": [
                      "chicken"
                    ],
                    "cuisine": "Mexican"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response (or an array for a batch).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted notification; no body."
          },
          "429": {
            "description": "Too many requests from this client.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "suggestion": {
                      "type": "string"
                    },
                    "retry_after": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Not supported",
        "operationId": "mcpGet",
        "responses": {
          "405": {
            "description": "This endpoint speaks JSON-RPC over POST only."
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "Redirects to /mcp-server",
        "operationId": "mcpRedirect",
        "responses": {
          "308": {
            "description": "Permanent redirect to /mcp-server (method and body preserved)."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "integer",
              "string"
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "initialize",
              "ping",
              "tools/list",
              "tools/call"
            ]
          },
          "params": {
            "type": "object"
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "integer",
              "string",
              "null"
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
