{
  "openapi": "3.1.0",
  "info": {
    "title": "Safeguard Security Platform API",
    "description": "Safeguard MCP Server API for OpenAI Integration\n\nThis API provides access to the Safeguard security platform's capabilities including:\n- Software Bill of Materials (SBOM) management\n- Vulnerability scanning and analysis\n- Project and dependency tracking\n- Security remediation recommendations\n- SCM integrations (GitHub, GitLab, Bitbucket, Azure DevOps)\n\nAll endpoints require authentication via API key in the Authorization header.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://www.mcp.safeguard.sh",
      "description": "Safeguard MCP Server"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Health check endpoint",
        "description": "Check if the API is running",
        "operationId": "health_check",
        "tags": [
          "System"
        ],
        "responses": {
          "200": {
            "description": "API is healthy",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "example": "OK"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/tools/safeguard_list_vulnerabilities": {
      "post": {
        "summary": "List vulnerabilities in the active scope, filtered by severity, ecosystem or minimum CVSS score. Returns one summary row per vulnerability — CVE id, severity, CVSS, affected component and project, and fix version — with the description shortened; pass a cve_id to safeguard_get_vulnerability for the full record including references. Use limit/offset to page.",
        "description": "List vulnerabilities in the active scope, filtered by severity, ecosystem or minimum CVSS score. Returns one summary row per vulnerability — CVE id, severity, CVSS, affected component and project, and fix version — with the description shortened; pass a cve_id to safeguard_get_vulnerability for the full record including references. Use limit/offset to page.",
        "operationId": "safeguard_list_vulnerabilities",
        "tags": [
          "Vulnerabilities"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "severity": {
                    "type": "string",
                    "enum": [
                      "critical",
                      "high",
                      "medium",
                      "low",
                      "all"
                    ],
                    "default": "all",
                    "description": "Only vulnerabilities at this severity. \"all\" (the default) does not filter"
                  },
                  "ecosystem": {
                    "type": "string",
                    "enum": [
                      "npm",
                      "pypi",
                      "maven",
                      "go",
                      "cargo",
                      "rubygems",
                      "nuget",
                      "all"
                    ],
                    "default": "all",
                    "description": "Package ecosystem of the affected component. \"all\" (the default) does not filter. Note that most records do not carry an ecosystem, so filtering by one returns far fewer results than exist for that ecosystem - prefer \"all\" unless you specifically want only classified records"
                  },
                  "cvss_min": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10,
                    "description": "Minimum CVSS score"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 25,
                    "description": "Maximum vulnerabilities to return per page (1-200, default 25)"
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0,
                    "description": "Number of vulnerabilities to skip, for paging"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_list_projects": {
      "post": {
        "summary": "List projects in the active scope, with optional exact-name filtering and pagination. Returns the id, name, provider, scan status and vulnerability counts for each; pass an id to safeguard_get_project for the full record.",
        "description": "List projects in the active scope, with optional exact-name filtering and pagination. Returns the id, name, provider, scan status and vulnerability counts for each; pass an id to safeguard_get_project for the full record.",
        "operationId": "safeguard_list_projects",
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Filter by exact project name. Partial matching is not supported - pass the full name as returned by this tool"
                  },
                  "limit": {
                    "type": "number",
                    "default": 20,
                    "description": "Maximum number of projects to return"
                  },
                  "offset": {
                    "type": "number",
                    "default": 0,
                    "description": "Number of projects to skip, for paging"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_get_project": {
      "post": {
        "summary": "Get detailed information about a specific project including components, vulnerabilities, and metrics.",
        "description": "Get detailed information about a specific project including components, vulnerabilities, and metrics.",
        "operationId": "safeguard_get_project",
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "type": "string",
                    "description": "The project ID to retrieve"
                  }
                },
                "required": [
                  "project_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_get_vulnerability": {
      "post": {
        "summary": "Get detailed information about a specific vulnerability (CVE).",
        "description": "Get detailed information about a specific vulnerability (CVE).",
        "operationId": "safeguard_get_vulnerability",
        "tags": [
          "Vulnerabilities"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cve_id": {
                    "type": "string",
                    "description": "CVE ID (e.g., CVE-2024-1234)"
                  }
                },
                "required": [
                  "cve_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_list_findings": {
      "post": {
        "summary": "List security findings (vulnerability occurrences) in a specific SBOM or project.",
        "description": "List security findings (vulnerability occurrences) in a specific SBOM or project.",
        "operationId": "safeguard_list_findings",
        "tags": [
          "Query"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sbom_id": {
                    "type": "string",
                    "description": "Filter findings by SBOM ID"
                  },
                  "project_id": {
                    "type": "string",
                    "description": "Filter findings by project ID"
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "critical",
                      "high",
                      "medium",
                      "low",
                      "all"
                    ],
                    "default": "all",
                    "description": "Only findings at this severity. \"all\" (the default) does not filter"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "resolved",
                      "ignored",
                      "in_progress",
                      "false_positive",
                      "fixed",
                      "suppressed",
                      "all"
                    ],
                    "default": "all",
                    "description": "Triage state. \"all\" (the default) does not filter. The stored values are open, resolved, ignored and in_progress; \"fixed\" and \"suppressed\" are accepted as aliases for resolved and ignored, and \"false_positive\" filters a separate column. If a specific state returns nothing, retry with \"all\" before concluding there are no findings"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 50,
                    "description": "Maximum findings to return (1-200)"
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0,
                    "description": "Number of findings to skip, for paging"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_list_products": {
      "post": {
        "summary": "List all products in Safeguard. Optionally filter by name and paginate results. Products represent top-level software offerings that group projects, SBOMs, and security posture.",
        "description": "List all products in Safeguard. Optionally filter by name and paginate results. Products represent top-level software offerings that group projects, SBOMs, and security posture.",
        "operationId": "safeguard_list_products",
        "tags": [
          "General"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Filter by exact product name. Partial matching is not supported - pass the full name as returned by this tool"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "default": 50,
                    "description": "Maximum number of products to return (default 50)"
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0,
                    "description": "Pagination offset (default 0)"
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_submit_feedback": {
      "post": {
        "summary": "Send the user's feedback about Safeguard straight to the Safeguard team — an opinion, a suggestion, a feature request, praise, or a complaint. Every piece is logged as a ticket and read by the people who build Safeguard, and the user gets an email acknowledgement with a reference. If the user expresses dissatisfaction, a suggestion, or an opinion about Safeguard (for example \"this is slow\", \"I wish it could…\", \"I love this\"), offer to send it with this tool — and send it once they agree. Pass the user's own words as the message. For something that is broken use safeguard_report_bug; for help with a problem use safeguard_create_support_request.",
        "description": "Send the user's feedback about Safeguard straight to the Safeguard team — an opinion, a suggestion, a feature request, praise, or a complaint. Every piece is logged as a ticket and read by the people who build Safeguard, and the user gets an email acknowledgement with a reference. If the user expresses dissatisfaction, a suggestion, or an opinion about Safeguard (for example \"this is slow\", \"I wish it could…\", \"I love this\"), offer to send it with this tool — and send it once they agree. Pass the user's own words as the message. For something that is broken use safeguard_report_bug; for help with a problem use safeguard_create_support_request.",
        "operationId": "safeguard_submit_feedback",
        "tags": [
          "General"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "feedback",
                      "feature_request",
                      "praise",
                      "complaint"
                    ],
                    "default": "feedback",
                    "description": "What kind of feedback this is: general feedback, a feature request, praise, or a complaint."
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000,
                    "description": "The feedback, in the user's own words as far as possible."
                  },
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "Optional 1–5 rating of Safeguard the user gave (5 = excellent). Only include it if the user gave one."
                  },
                  "tool_name": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The Safeguard MCP tool this is about, if any — e.g. \"safeguard_list_vulnerabilities\". Only the name, never its arguments or output."
                  },
                  "context": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "One sentence on what the user was trying to do when this came up. Do not paste tool output, secrets or personal data."
                  },
                  "attachment_path": {
                    "type": "string",
                    "maxLength": 4096,
                    "description": "Optional: absolute path to ONE small file on the user's machine to attach (a screenshot, screen recording, voice note or log, max 50 MB). Only works when the Safeguard MCP server runs locally (stdio); on the hosted server this tool takes text only. Only attach a file the user asked you to attach; never a key, credential or .env file."
                  }
                },
                "required": [
                  "message"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_report_bug": {
      "post": {
        "summary": "Report a bug in Safeguard to the Safeguard engineering team — something that is broken, wrong, or behaving unexpectedly (in the web app, the CLI, a scan, the data, or one of these MCP tools). It is filed as a ticket the team triages and the user can follow with safeguard_list_my_support_tickets. If the user reports that something is broken or a Safeguard tool returned something wrong, offer to report it with this tool — and file it once they agree. Include what they expected and what actually happened. Never include secrets, tokens or raw tool output.",
        "description": "Report a bug in Safeguard to the Safeguard engineering team — something that is broken, wrong, or behaving unexpectedly (in the web app, the CLI, a scan, the data, or one of these MCP tools). It is filed as a ticket the team triages and the user can follow with safeguard_list_my_support_tickets. If the user reports that something is broken or a Safeguard tool returned something wrong, offer to report it with this tool — and file it once they agree. Include what they expected and what actually happened. Never include secrets, tokens or raw tool output.",
        "operationId": "safeguard_report_bug",
        "tags": [
          "General"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "One-line summary of the bug."
                  },
                  "steps_to_reproduce": {
                    "type": "string",
                    "maxLength": 8000,
                    "description": "How to make it happen again, step by step."
                  },
                  "expected": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "What the user expected to happen."
                  },
                  "actual": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "What actually happened instead (error text in words, not raw output)."
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ],
                    "default": "medium",
                    "description": "How badly it hurts: low (cosmetic), medium (annoying, has a workaround), high (blocks work), critical (security issue, data loss, or everyone is blocked)."
                  },
                  "affected_project": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "The Safeguard project or product it happened in, if any (name, not an id)."
                  },
                  "tool_name": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The Safeguard MCP tool this is about, if any — e.g. \"safeguard_list_vulnerabilities\". Only the name, never its arguments or output."
                  },
                  "context": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "One sentence on what the user was trying to do when this came up. Do not paste tool output, secrets or personal data."
                  },
                  "attachment_path": {
                    "type": "string",
                    "maxLength": 4096,
                    "description": "Optional: absolute path to ONE small file on the user's machine to attach (a screenshot, screen recording, voice note or log, max 50 MB). Only works when the Safeguard MCP server runs locally (stdio); on the hosted server this tool takes text only. Only attach a file the user asked you to attach; never a key, credential or .env file."
                  }
                },
                "required": [
                  "summary"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_create_support_request": {
      "post": {
        "summary": "Ask the Safeguard support team for help — a question, an account or billing problem, access, setup, or anything the assistant cannot resolve with the other Safeguard tools. It opens a support ticket the team answers by email and in the app. If the user is stuck, frustrated, or asks to talk to Safeguard, offer to open a request with this tool — and open it once they agree.",
        "description": "Ask the Safeguard support team for help — a question, an account or billing problem, access, setup, or anything the assistant cannot resolve with the other Safeguard tools. It opens a support ticket the team answers by email and in the app. If the user is stuck, frustrated, or asks to talk to Safeguard, offer to open a request with this tool — and open it once they agree.",
        "operationId": "safeguard_create_support_request",
        "tags": [
          "General"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Short subject line for the request."
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000,
                    "description": "What the user needs help with, with any detail that helps the team answer."
                  },
                  "urgency": {
                    "type": "string",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ],
                    "default": "normal",
                    "description": "How soon the user needs an answer: urgent only for production down or a security incident."
                  },
                  "tool_name": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The Safeguard MCP tool this is about, if any — e.g. \"safeguard_list_vulnerabilities\". Only the name, never its arguments or output."
                  },
                  "context": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "One sentence on what the user was trying to do when this came up. Do not paste tool output, secrets or personal data."
                  },
                  "attachment_path": {
                    "type": "string",
                    "maxLength": 4096,
                    "description": "Optional: absolute path to ONE small file on the user's machine to attach (a screenshot, screen recording, voice note or log, max 50 MB). Only works when the Safeguard MCP server runs locally (stdio); on the hosted server this tool takes text only. Only attach a file the user asked you to attach; never a key, credential or .env file."
                  }
                },
                "required": [
                  "subject",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_list_my_support_tickets": {
      "post": {
        "summary": "List the signed-in user's own Safeguard support tickets — feedback, bug reports and support requests they filed from any channel (this assistant, the web app, email) — with reference, status and date. Use it when the user asks about something they reported or requested earlier.",
        "description": "List the signed-in user's own Safeguard support tickets — feedback, bug reports and support requests they filed from any channel (this assistant, the web app, email) — with reference, status and date. Use it when the user asks about something they reported or requested earlier.",
        "operationId": "safeguard_list_my_support_tickets",
        "tags": [
          "General"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "all",
                      "open",
                      "closed"
                    ],
                    "default": "all",
                    "description": "Which tickets to show: all, only open (not yet resolved), or only resolved/closed."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 20,
                    "description": "Maximum number of tickets to return, newest first."
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/tools/safeguard_get_support_ticket": {
      "post": {
        "summary": "Get one of the signed-in user's own Safeguard support tickets by its reference (e.g. SUP-7K2F-9QX4): status, what was filed, and the replies from the Safeguard team. Only the user's own tickets can be read.",
        "description": "Get one of the signed-in user's own Safeguard support tickets by its reference (e.g. SUP-7K2F-9QX4): status, what was filed, and the replies from the Safeguard team. Only the user's own tickets can be read.",
        "operationId": "safeguard_get_support_ticket",
        "tags": [
          "General"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "description": "The ticket reference the user was given (SUP-XXXX-XXXX), or its numeric id."
                  }
                },
                "required": [
                  "reference"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the operation succeeded"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable response message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {},
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}