{
  "openapi": "3.1.0",
  "info": {
    "title": "Frisky GPT MCP Actions",
    "version": "0.2.0-beta.1",
    "description": "GPT Action schema for calling Frisky Dev specialist operators through the Frisky MCP backend."
  },
  "servers": [
    {
      "url": "https://mcp.friskydev.com"
    }
  ],
  "paths": {
    "/consult_specialist": {
      "post": {
        "operationId": "consult_specialist",
        "summary": "Consult a Frisky specialist",
        "description": "Calls a Frisky specialist by slug. Use live_call=true only when the GPT Action has either a Frisky OAuth access token or machine bearer token configured.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsultSpecialistRequest"
              },
              "examples": {
                "director": {
                  "summary": "Frisky Director",
                  "value": {
                    "slug": "frisky-director",
                    "request": "Prioritize today's beta work.",
                    "live_call": true
                  }
                },
                "telegram": {
                  "summary": "Telegram Bot Specialist",
                  "value": {
                    "slug": "frisky-telegram-bot-specialist",
                    "request": "Design the Telegram summon flow.",
                    "live_call": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Specialist response or prompt packet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultSpecialistResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing slug or request."
          },
          "401": {
            "description": "Bearer token required for live calls."
          },
          "500": {
            "description": "Backend or specialist execution error."
          }
        }
      }
    },
    "/api/specialists": {
      "get": {
        "operationId": "list_specialists",
        "summary": "List Frisky specialists",
        "description": "Returns the available Frisky specialist registry.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional search query."
          }
        ],
        "responses": {
          "200": {
            "description": "Specialist registry.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "specialists": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpecialistSummary"
                      }
                    }
                  },
                  "required": [
                    "specialists"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Use either a Frisky OAuth access token from the MCP login flow or the machine token from FRISKY_BOT_API_TOKEN."
      }
    },
    "schemas": {
      "ConsultSpecialistRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "slug": {
            "type": "string",
            "description": "Specialist slug, for example frisky-director, frisky-launch-strategy, frisky-codex-engineer, frisky-telegram-bot-specialist, frisky-trust-safety, clipsflow-streaming-systems."
          },
          "request": {
            "type": "string",
            "description": "The concrete task or question for the specialist."
          },
          "live_call": {
            "type": "boolean",
            "description": "When true, the backend calls the configured Vertex/OpenAI model. When false, it returns a prompt packet."
          }
        },
        "required": [
          "slug",
          "request",
          "live_call"
        ]
      },
      "ConsultSpecialistResponse": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "live_call",
              "prompt_packet"
            ]
          },
          "specialist": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "response_id": {
            "type": "string"
          },
          "output": {
            "type": "string"
          },
          "prompt_packet": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "specialist"
        ]
      },
      "SpecialistSummary": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "starter_prompts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priority": {
            "type": "number"
          }
        },
        "required": [
          "slug",
          "name",
          "description"
        ]
      }
    }
  }
}
