{
  "openapi": "3.1.0",
  "info": {
    "title": "One Server Management API",
    "version": "v1",
    "description": "One Server 管理 API です。すべてのリクエストに Authorization: Bearer <トークン> ヘッダーが必要です。トークンはコンソールのアカウント、API と MCP トークンで作成します。?lang=en または ?lang=ja でエラーメッセージの言語を選べます。"
  },
  "servers": [
    {
      "url": "https://end.blackall.ai/api/v1"
    }
  ],
  "tags": [
    {
      "name": "account",
      "description": "アカウントとリージョン"
    },
    {
      "name": "projects",
      "description": "プロジェクト"
    },
    {
      "name": "keys",
      "description": "キーと署名"
    },
    {
      "name": "database",
      "description": "データベース"
    },
    {
      "name": "auth",
      "description": "認証とユーザー"
    },
    {
      "name": "storage",
      "description": "ストレージ"
    },
    {
      "name": "deployments",
      "description": "デプロイとリポジトリ"
    },
    {
      "name": "functions",
      "description": "関数"
    },
    {
      "name": "domains",
      "description": "ドメインとエッジ"
    },
    {
      "name": "network",
      "description": "ネットワーク"
    },
    {
      "name": "jobs",
      "description": "スケジュールジョブ"
    },
    {
      "name": "webhooks",
      "description": "データベース Webhook"
    },
    {
      "name": "backups",
      "description": "バックアップと復元"
    },
    {
      "name": "logs",
      "description": "ログと監視"
    },
    {
      "name": "team",
      "description": "チームと通知"
    },
    {
      "name": "billing",
      "description": "料金と使用量"
    },
    {
      "name": "other",
      "description": "その他"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "get_root",
        "summary": "API バージョン",
        "description": "この API の名前とバージョンを返します。トークンが受け付けられるか確かめるときに使います。",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {},
                    "version": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        },
        "x-oneend-scope": null
      }
    },
    "/me": {
      "get": {
        "operationId": "whoami",
        "summary": "自分のアカウント",
        "description": "このトークンが誰のもので、何ができるかを返します。operator は運営者ツールを使えるか（active）と、使えないときのこのアカウントの理由（refused: not_listed、token_bound、no_second_factor）です。どこから始めればよいかわからないときは、最初に呼び出してください。",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "email": {},
                    "organisation": {},
                    "projects": {},
                    "scopes": {},
                    "zone": {},
                    "read_only": {},
                    "next": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "whoami"
      }
    },
    "/regions": {
      "get": {
        "operationId": "list_regions",
        "summary": "リージョン",
        "description": "リージョンの一覧を返します。今プロジェクトを作成できるのは、can_createがtrueのリージョンだけです。falseのリージョンは準備中のため一覧には表示されますが、まだ選べません。リージョンはプロジェクト作成時に一度だけ選び、後から変更できないため、create_projectの前に確認してください。",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "code": {},
                      "name": {},
                      "country": {},
                      "status": {},
                      "is_default": {},
                      "can_create": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_regions"
      }
    },
    "/regions/requests": {
      "post": {
        "operationId": "request_region",
        "summary": "リージョンのリクエスト",
        "description": "まだ開いていないリージョン（can_createがfalseのリージョン）が必要であることを登録します。担当者からご連絡します。時期はお約束できません。すでに開いているリージョンはリクエストするものではありません。create_projectでそのままプロジェクトを作成してください。",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "region": {},
                    "name": {},
                    "recorded": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "request_region",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "region": {
                    "type": "string",
                    "description": "list_regionsがcan_create=falseで返したコードです。"
                  },
                  "note": {
                    "type": "string",
                    "description": "そこで何を動かす予定か、なぜそのリージョンでなければならないかを書いてください。任意ですが、ご連絡する担当者が最初に読む内容です。"
                  }
                },
                "required": [
                  "region"
                ]
              }
            }
          }
        }
      }
    },
    "/server-sizes": {
      "get": {
        "operationId": "list_server_sizes",
        "summary": "サーバーサイズと料金",
        "description": "サーバーサイズ（メモリ）ごとのGoogle マシン、CPU、リージョン別の月額（monthly_minor）です。通貨を空にすると組織の決済通貨です。KRWはウォン（付加価値税込み）、USDはセント（決済時に税金を追加）です。included_inがproのサイズはProプランに含まれます。region_statusがplannedのリージョンは準備中のため選べません。listedがfalseならまだ販売しておらず、sizesは空です。",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "1つのリージョンだけを見るときのコード（list_regionsのcode）です。空ならすべてのリージョンです。"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "KRW",
                "USD"
              ],
              "description": "KRWまたはUSDです。空なら組織の決済通貨です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_server_sizes"
      }
    },
    "/imports/sources": {
      "get": {
        "operationId": "import_sources",
        "summary": "取り込み元",
        "description": "コンソールの「他のサーバーから取り込む」と同じです。この組織に接続した取り込み元のアカウント（Supabase、Vercel、PostgreSQL）ごとに、そのプロジェクト一覧とこれまでの取り込みを返します。アカウントの接続はコンソール（connect_url）で行います。トークンをチャットに貼らないためです。",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "組織の id か名前。空ならこのトークンが届く最初の組織。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organisation": {},
                    "connect_url": {},
                    "sources": {},
                    "imports": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "import_sources"
      }
    },
    "/imports": {
      "post": {
        "operationId": "start_import",
        "summary": "取り込みを開始",
        "description": "コンソールの [取り込みを開始] と同じです。コンソールで分割した取り込み（import）か、import_sources の connection と project から新しい取り込みを（まとまりごとに新しいプロジェクトに分けて）開始します。新しいプロジェクトを作り、元は変えません。Supabase の元は address にセッションプーラーの接続文字列が必要で、今回の実行だけに使って削除します。止まった取り込みをもう一度開始すると、終わった移す先は飛ばし、変わったものだけ移します。オーナー・管理者・開発者のみ実行できます。",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "組織の id か名前。空ならこのトークンが届く最初の組織。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "start_import",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/imports/{id}": {
      "get": {
        "operationId": "get_import",
        "summary": "取り込みの進行状況",
        "description": "コンソールの取り込みの進行画面と同じです。移す先ごとに段階（スキーマ、ログインユーザー、データ、ファイル、スケジュールジョブ…）の状態と数、移さないものとその理由、確認することを返します。",
        "tags": [
          "account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "取り込みの id。"
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "組織の id か名前。空ならこのトークンが届く最初の組織。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_import"
      }
    },
    "/projects": {
      "get": {
        "operationId": "get_projects",
        "summary": "プロジェクト",
        "description": "このアカウントのプロジェクトと、それぞれのAPIアドレスを返します。status は ready（使える）、provisioning（データベースを作成中、数秒）、failed（retry_provisioning）、paused のいずれかです。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "ref": {},
                      "name": {},
                      "organisation": {},
                      "organisation_id": {},
                      "region": {},
                      "api_url": {},
                      "paused": {},
                      "archive_at": {},
                      "archive_purge_at": {},
                      "created_at": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_projects"
      },
      "post": {
        "operationId": "create_project",
        "summary": "プロジェクトの作成",
        "description": "データベース、ログイン、ファイルストレージを備えた新しいプロジェクトを作成します。リージョンを空にすると既定のリージョンになります。リージョンはプロジェクト作成後に変更できません。料金はどのリージョンでも同じです。組織が複数あるときは、org でどの組織に作るかを選びます（その組織のオーナー、管理者、開発者だけが、プランのプロジェクト数の範囲で作れます）。データベースは数秒後に使えるようになります。status が provisioning なら wait（秒）を渡すか、list_projects の status が ready になってからテーブルやキーを使ってください。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 120,
              "description": "データベースの準備ができる（status: ready）まで待つ秒数です。既定の0はすぐに応答します。通常は数秒です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "organisation": {},
                    "region": {},
                    "api_url": {},
                    "status": {},
                    "created_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "502": {
            "$ref": "#/components/responses/E502"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "create_project",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "人が読むための名前です。"
                  },
                  "region": {
                    "type": "string",
                    "description": "作成する場所です。使える値はlist_regionsで確認できます。空の場合は既定のリージョンです。"
                  },
                  "org": {
                    "type": "string",
                    "description": "作成する組織の id か名前です（list_projects の organisation_id か organisation）。空なら、プロジェクトを作れる最初の組織です。"
                  },
                  "wait": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 120,
                    "description": "データベースの準備ができる（status: ready）まで待つ秒数です。既定の0はすぐに応答します。通常は数秒です。"
                  },
                  "tier": {
                    "type": "string",
                    "description": "このプロジェクト専用サーバーのサイズです。list_server_sizesが返した値（例: 4gb）か、プランの標準サイズを表すdefaultを渡します。プロジェクトができた直後にサーバーを申請します。空なら共用サーバーで始まります。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}": {
      "get": {
        "operationId": "get_projects_ref",
        "summary": "単一のプロジェクト",
        "description": "プロジェクト一覧のうち、この ref の項目を返します。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "ref": {},
                      "name": {},
                      "organisation": {},
                      "organisation_id": {},
                      "region": {},
                      "api_url": {},
                      "paused": {},
                      "archive_at": {},
                      "archive_purge_at": {},
                      "created_at": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_projects"
      },
      "patch": {
        "operationId": "rename_project",
        "summary": "名前の変更",
        "description": "プロジェクト名、組織名、またはその両方を変更します。識別子（ref）とアドレスは変わりません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "organisation": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "rename_project",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "新しいプロジェクト名です。"
                  },
                  "organisation": {
                    "type": "string",
                    "description": "新しい組織名です。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_project",
        "summary": "プロジェクトの削除",
        "description": "プロジェクトのテーブル、ユーザー、ファイル、関数、予約ジョブ、環境変数、ドメインを完全に削除します。元に戻せません。ユーザーがはっきり求めたときだけ使い、confirmにプロジェクト名を正確に入れてください。最後に残ったプロジェクトは削除できません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "deleted": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "delete_project",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "プロジェクト名です。list_projectsの名前と完全に一致する必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/transfer": {
      "get": {
        "operationId": "list_transfer_targets",
        "summary": "移管できる組織",
        "description": "このプロジェクトを移管できる別の組織（自分がオーナーか管理者の組織）の id、名前、プランです。can_transfer は、現在の組織のオーナーとして移管できるかどうかです。transfer_project の organisation に id を入れてください。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "organisation": {},
                    "organisation_id": {},
                    "targets": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_transfer_targets"
      },
      "post": {
        "operationId": "transfer_project",
        "summary": "プロジェクトの移管",
        "description": "プロジェクトを別の組織へ移します。現在の組織のオーナーであり、受け取る組織のオーナーか管理者である必要があり、受け取る組織のプランにプロジェクトの空きが必要です。移管後の使用量は受け取る組織に請求され、今月の請求は移管した時点で分かれます。元の組織のメンバーに個別に与えたアクセスはなくなり、戻すには受け取る組織のオーナーがもう一度移管する必要があります。アドレス、キー、データ、デプロイはそのままです。ユーザーがはっきり求めたときだけ使い、confirm にプロジェクト名をそのまま入れてください。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "organisation": {},
                    "organisation_id": {},
                    "transferred": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "transfer_project",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organisation": {
                    "type": "string",
                    "description": "受け取る組織の id です。list_transfer_targets が返します。同じ名前の組織が1つだけなら名前でも構いません。"
                  },
                  "confirm": {
                    "type": "string",
                    "description": "プロジェクト名です。list_projects の name と完全に同じである必要があります。"
                  }
                },
                "required": [
                  "organisation",
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/pause": {
      "post": {
        "operationId": "pause_project",
        "summary": "プロジェクトの一時停止",
        "description": "プロジェクトのすべての動作を止めます。サイト、API、関数は503を返し、リアルタイム接続は拒否され、予約ジョブと新しいデプロイも止まります。データとファイルはそのまま残り、resume_projectですぐに元に戻せます。90 日を超えて一時停止すると、データベースをアーカイブストレージへ移します（get_project_archive）。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "paused": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "pause_project"
      }
    },
    "/projects/{ref}/resume": {
      "post": {
        "operationId": "resume_project",
        "summary": "プロジェクトの再開",
        "description": "一時停止したプロジェクトを再び動かします。無料プランで 3 日間使われずに停止したプロジェクトもこれで（または新しいデプロイで）再開します。予約ジョブは逃した実行を取り戻さず、次の予定時刻から実行します。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "paused": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "resume_project"
      }
    },
    "/projects/{ref}/server": {
      "get": {
        "operationId": "get_server",
        "summary": "専用サーバー",
        "description": "プロジェクトの専用サーバーを表示します: サイズ(tier)、場所、状態、アドレス、月額、待機サーバー、自動切り替え、復元できる期間、次に移動できる日、進行中の作業(jobs)。server が null なら共用サーバーを使っています。offered が false ならまだ提供していません。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "offered": {},
                    "server": {},
                    "standby": {},
                    "options": {},
                    "next_move_at": {},
                    "jobs": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_server"
      },
      "post": {
        "operationId": "request_server",
        "summary": "専用サーバーを借りる",
        "description": "このプロジェクトだけが使うサーバーを借ります。サイズと場所ごとの月額は先に list_server_sizes で見せ、ユーザーが選んだものだけを渡してください。通常 10 分以内に準備でき、データベースとアプリを移してからアドレスを切り替えます。Pro プランから。オーナーと管理者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "request_server",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tier": {
                    "type": "string",
                    "pattern": "^[0-9]+gb$",
                    "description": "サーバーサイズ。list_server_sizes の tier(例: 4gb)。"
                  },
                  "region": {
                    "type": "string",
                    "pattern": "^[a-z]{2}-[a-z]+-[0-9]$",
                    "description": "場所。省略するとプロジェクトの場所。list_server_sizes の region。"
                  }
                },
                "required": [
                  "tier"
                ]
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "resize_server",
        "summary": "サーバーサイズを変更",
        "description": "専用サーバーのサイズを変更します。when=now は今すぐ、tonight はサーバーの場所の時刻で 3〜5 時。待機サーバーがなければ 3〜5 分応答せず、あれば切り替えの数秒だけ止まります。サイズ変更は無料で、月額は新しいサイズの価格です(list_server_sizes)。オーナーと管理者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "resize_server",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tier": {
                    "type": "string",
                    "pattern": "^[0-9]+gb$",
                    "description": "サーバーサイズ。list_server_sizes の tier(例: 4gb)。"
                  },
                  "when": {
                    "type": "string",
                    "enum": [
                      "now",
                      "tonight"
                    ],
                    "description": "now(既定)または tonight(3〜5 時)。"
                  }
                },
                "required": [
                  "tier"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "release_server",
        "summary": "専用サーバーを返却",
        "description": "専用サーバーを返却します: 最後のバックアップを取り、データベースとアプリを共用サーバーに移してから、サーバー(と待機サーバー)を削除します。移動中は書き込みが止まります。ユーザーが求めたときだけ使い、confirm に ref をそのまま入れてください。オーナーと管理者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "release_server",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "プロジェクト ID(ref)。ref と同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/server/standby": {
      "put": {
        "operationId": "set_standby",
        "summary": "待機サーバー",
        "description": "同じ場所・同じサイズの待機サーバーをオンまたはオフにします。データベースを継続的に複製し、月額はそのサイズと同じです(list_server_sizes)。auto_failover=true なら、主サーバーが 60 秒応答しないとき自動で待機サーバーに切り替えます(待機サーバーが必要)。オーナーと管理者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_standby",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "standby": {
                    "type": "boolean",
                    "description": "待機サーバーを置くかどうか。"
                  },
                  "auto_failover": {
                    "type": "boolean",
                    "description": "自動切り替え。既定は false。"
                  }
                },
                "required": [
                  "standby"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/server/move": {
      "post": {
        "operationId": "move_server",
        "summary": "サーバーの場所を移動",
        "description": "専用サーバーを別の場所に移します。無料で月に 1 回です(next_move_at)。新しい場所にサーバーを作って複製し、アドレスを切り替える瞬間に書き込みが数秒止まります。古いサーバーは 7 日間残します。月額は新しい場所の価格です(list_server_sizes)。オーナーと管理者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "move_server",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "region": {
                    "type": "string",
                    "pattern": "^[a-z]{2}-[a-z]+-[0-9]$",
                    "description": "場所。list_server_sizes の region(例: kr-seoul-1)。"
                  }
                },
                "required": [
                  "region"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/server/restore-days": {
      "put": {
        "operationId": "set_restore_days",
        "summary": "復元できる期間",
        "description": "特定の時刻に戻せる期間を 7 日または 28 日にします。28 日は専用サーバーでのみ使え、月額の追加料金があります(get_server の options、get_billing)。オーナーと管理者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_restore_days",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "days": {
                    "type": "integer",
                    "enum": [
                      7,
                      28
                    ],
                    "description": "7 または 28。"
                  }
                },
                "required": [
                  "days"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/archive": {
      "get": {
        "operationId": "get_project_archive",
        "summary": "データベースのアーカイブ状態",
        "description": "データベースを使えない状態（支払いの失敗、無料プラン、一時停止）が 90 日続くと、アーカイブストレージへ移します。このプロジェクトの状況を返します: state（none、scheduled、archiving、archived、restoring、purged）、reason、archive_at（移す日時）、purge_at（アーカイブとファイルを削除する日時、移してから 1 年後）、restore_blocked_by。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_project_archive"
      }
    },
    "/projects/{ref}/archive/restore": {
      "post": {
        "operationId": "restore_project_archive",
        "summary": "アーカイブしたデータベースを復元",
        "description": "アーカイブストレージのデータベースを、アーカイブしたときのまま作り直します。通常は数分で、一時停止中のプロジェクトは復元と同時に再開します。お支払いが完了していないときや無料プランでは拒否します（restore_blocked_by）。アーカイブがすでに削除されていれば、空のデータベースを新しく作成します。オーナーと管理者のみ行えます。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "restore": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "restore_project_archive"
      }
    },
    "/projects/{ref}/archive/download": {
      "post": {
        "operationId": "create_archive_download_url",
        "summary": "アーカイブのダウンロード用アドレス",
        "description": "アーカイブしたデータベース（pg_dump 形式。pg_restore で復元）を 1 時間ダウンロードできる署名付きアドレスを作成します。理由が必要で、アクセス記録に残ります。オーナーと管理者のみ行えます。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "url": {},
                    "expires_at": {},
                    "bytes": {},
                    "format": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_archive_download_url",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 300,
                    "description": "ダウンロードする理由。アクセス記録に残ります。"
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/keys": {
      "get": {
        "operationId": "get_project_keys",
        "summary": "APIキーの取得",
        "description": "プロジェクトのアドレスと2つのキーを返します。パブリッシャブルキーはブラウザ用です。シークレットキーはすべてのアクセスルールを迂回するため、サーバーでのみ使ってください。書き込み権限のあるトークンだけが呼び出せます。フロントエンドのコードに入れる値が必要なときは only: \"publishable\" で呼び出してください。アドレスとパブリッシャブルキーだけが返り、シークレットキーが会話やコードに混ざりません（読み取り権限のトークンでも呼び出せます）。",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "publishable"
              ],
              "description": "publishableならアドレスとパブリッシャブルキーだけを返します。空なら両方のキーを返します。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "api_url": {},
                    "publishable_key": {},
                    "secret_key": {},
                    "key_version": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "get_project_keys"
      }
    },
    "/projects/{ref}/advisors": {
      "get": {
        "operationId": "get_advisors",
        "summary": "セキュリティとパフォーマンスの点検",
        "description": "プロジェクトのデータベース構造からセキュリティとパフォーマンスの問題を探します。RLSがオフのテーブル、誰でも書き込めるルール、アクセスルールを迂回するビュー、search_pathが固定されていないsecurity definer関数、ユーザーテーブルを公開するビュー、インデックスのない外部キー、主キーのないテーブル、重複したインデックス、行ごとにuid()を呼び出すルールが対象です。修正するSQLがある項目にはそれ（remedy）を添えます。データは読みません。テーブルを作成したりルールを変更したりした後に呼び出してください。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_advisors"
      }
    },
    "/projects/{ref}/api-keys": {
      "get": {
        "operationId": "list_api_keys",
        "summary": "名前付きAPIキー",
        "description": "用途ごとに作成したbw_publishable_キーとbw_secret_キーそれぞれの名前、種類、プレフィックス、最終使用日時、失効状態です。シークレットキーの値は返しません。パブリッシャブルキーの値は返します。",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {},
                      "name": {},
                      "kind": {},
                      "prefix": {},
                      "publishable_key": {},
                      "created_at": {},
                      "created_by": {},
                      "last_used_at": {},
                      "revoked_at": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_api_keys"
      },
      "post": {
        "operationId": "create_api_key",
        "summary": "APIキーの作成",
        "description": "名前付きのキーを1つ作成します。publishableはブラウザ用（アクセスルールに従う）、secretはサーバー用（アクセスルールを迂回する）です。シークレットキーの値はこの応答にだけ含まれ、二度と表示できません。キーを作成できるのはオーナーと管理者のみで、プロジェクトごとに20個までです。",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_api_key",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "publishable",
                      "secret"
                    ],
                    "description": "ブラウザ用はpublishable、サーバー用はsecretです。"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "キーの用途です。例: 決済サーバー"
                  }
                },
                "required": [
                  "kind",
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/api-keys/{id}": {
      "delete": {
        "operationId": "revoke_api_key",
        "summary": "APIキーの失効",
        "description": "名前付きのキーを1つ失効させます。そのキーを使ったリクエストは30秒以内に拒否されるようになります。ほかのキーには影響しません。元に戻せません。",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_api_keysのidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revoked": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "revoke_api_key"
      }
    },
    "/projects/{ref}/s3-keys": {
      "get": {
        "operationId": "list_s3_keys",
        "summary": "S3 アクセスキー一覧",
        "description": "S3 エンドポイント(endpoint、region、force_path_style)と TUS による再開可能なアップロードのアドレス、そして各 S3 アクセスキーの名前、アクセスキー ID、最終使用日時、失効状態です。シークレットアクセスキーは返しません。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keys": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_s3_keys"
      },
      "post": {
        "operationId": "create_s3_key",
        "summary": "S3 アクセスキーを作成",
        "description": "AWS SDK、aws CLI、rclone が /storage/v1/s3 へのリクエストに署名するアクセスキー ID とシークレットアクセスキーを作成します。サービスロールとして動き、アクセスルールを無視するので、サーバーにだけ置いてください。シークレットアクセスキーはこの応答にしかなく、二度と見られません。作成できるのはオーナーと管理者だけで、プロジェクトごとに 20 個までです。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_s3_key",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "キーの用途です。例: バックアップサーバー"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/s3-keys/{id}": {
      "delete": {
        "operationId": "revoke_s3_key",
        "summary": "S3 アクセスキーを失効",
        "description": "S3 アクセスキーを 1 つ失効させます。30 秒以内に、そのキーで署名したリクエストは拒否されます。他のキーには影響しません。元に戻せません。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_s3_keys の keys[].id です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revoked": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "revoke_s3_key"
      }
    },
    "/projects/{ref}/tables/{table}/csv": {
      "get": {
        "operationId": "export_table_csv",
        "summary": "テーブルをCSVでエクスポート",
        "description": "テーブルの行を CSV で返します（1行目は列名）。コンソールのテーブルエディターのエクスポートと同じです。1MB まで返り、超えると行の区切りで切って truncated が true になります。そのときは filters で範囲を分けて何回かに分けて受け取ってください。空欄は NULL、\"\" は空文字列です。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "テーブル名です（list_tables）。"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "この列の順に並べます。空ならテーブルの既定の順です。"
            }
          },
          {
            "name": "desc",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true なら大きいものから並べます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "table": {},
                    "rows": {},
                    "bytes": {},
                    "truncated": {},
                    "csv": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "export_table_csv"
      },
      "post": {
        "operationId": "import_table_csv",
        "summary": "CSVをテーブルにインポート",
        "description": "CSV の行をテーブルに入れます。コンソールのテーブルエディターのインポートと同じです。1行目は列名で、同じ名前の列に入ります（columns で変えられます）。1行でも入れられなければ何も入れず、行番号と理由を返します。2MB、10,000行までです。引用符のない空欄は NULL か列の既定値です。それより大きいときは分けて呼び出してください。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "テーブル名です（list_tables）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "table": {},
                    "inserted": {},
                    "columns": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "import_table_csv",
        "x-oneend-max-body-bytes": 4194304,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "csv": {
                    "type": "string",
                    "description": "CSV の内容です。1行目は列名です。"
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "CSV の列ごとに入れるテーブルの列名で、飛ばす列は \"\" です。1行目と同じ数が必要です。省略すると同じ名前どうしです。"
                  }
                },
                "required": [
                  "csv"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/tables": {
      "get": {
        "operationId": "list_tables",
        "summary": "テーブル",
        "description": "プロジェクトのテーブルを、列、おおよその行数、アクセスルールの状態とともに返します。ルールがオンなのにルールが1つもない場合、パブリッシャブルキーからは何も見えません。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {},
                      "approximate_rows": {},
                      "row_level_security": {},
                      "policies": {},
                      "columns": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_tables"
      }
    },
    "/projects/{ref}/policies": {
      "get": {
        "operationId": "list_policies",
        "summary": "アクセスルール",
        "description": "どのテーブルのどの操作が誰に開かれているかを返します。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_policies"
      }
    },
    "/projects/{ref}/storage/policies": {
      "post": {
        "operationId": "post_projects_ref_storage_policies",
        "summary": "ファイルのアクセスルールの作成",
        "description": "ファイルテーブル（`objects`）にアクセスルールを 1 つ追加します。`name`、`command`（select・insert・update・delete・all）、`roles`、`using`、`check` を受け取ります。プロジェクトのログインはファイルテーブルの所有者ではないため SQL ではルールを作れません。このルートを使います。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/storage/copy-from-import": {
      "post": {
        "operationId": "copy_storage_from_import",
        "summary": "取り込み元からファイルをコピー",
        "description": "import_sources で接続した Supabase アカウントで、そのプロジェクトのバケットとファイルをこのサーバーのプロジェクト（ref）にコピーします。ここにないバケットは Supabase と同じ公開設定・サイズ上限・形式で作り、ファイルは upload_object と同じストレージに同じ上限で入れます。ここに同じサイズのファイルがあれば飛ばすので、呼び直しても大丈夫です。1 回でファイル 200 個（max_files）、45 秒までコピーし、残りがあれば答えの next を渡して done が true になるまで呼び直します。答えはバケットごとの created、copied、skipped、failed、bytes と、失敗したファイルの一部です。Supabase のキーは会話に出ません。バケットのアクセスルールはコピーしません。dry_run なら何も変えずに数だけ表示します。オーナー・管理者・開発者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "source_project": {},
                    "dry_run": {},
                    "done": {},
                    "next": {},
                    "buckets": {},
                    "failures": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "copy_storage_from_import",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "buckets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "コピーする Supabase のバケット名。空ならすべて。"
                  },
                  "rename": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "バケット名の変更 {\"Supabase のバケット\": \"ここのバケット\"}。なければ小文字にし、空白を - にします（My Files → my-files）。"
                  },
                  "dry_run": {
                    "type": "boolean",
                    "description": "true なら変更せず、作るバケットとコピーするファイルの数だけ表示します。"
                  },
                  "max_files": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "description": "今回コピーするファイル数の上限（既定 200、最大 1000）。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/usage": {
      "get": {
        "operationId": "usage",
        "summary": "使用量",
        "description": "テーブル、行、ユーザー、ファイルの数、使用しているストレージ容量、今月の計量値、1分あたりの上限（limits.outbound_requests_per_minute: 関数・pg_net・HTTPジョブが共有する外部リクエスト。自分のAPIへの呼び出しは数えません）を返します。",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tables": {},
                    "approximate_rows": {},
                    "users": {},
                    "files": {},
                    "storage_bytes": {},
                    "database_bytes": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "usage"
      }
    },
    "/projects/{ref}/users": {
      "get": {
        "operationId": "list_users",
        "summary": "サービスのユーザー",
        "description": "このプロジェクトを使うサービスに新規登録したユーザーです。プラットフォームのアカウントとは別です。一度に最大200人まで返り、totalが全体の人数です。has_moreがtrueならまだ続きがあるので、offsetを増やして再度呼び出してください。usersの長さを人数として扱うのは誤りです。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "description": "一度に取得するユーザー数です。既定は50、最大200です。"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "読み飛ばすユーザー数です。既定は0です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {},
                    "total": {},
                    "limit": {},
                    "offset": {},
                    "has_more": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_users"
      },
      "post": {
        "operationId": "add_user",
        "summary": "ユーザーの追加",
        "description": "このプロジェクトのサービスにユーザーを1人作成します。パスワードは10文字以上が必要です。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "added": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "add_user",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "ユーザーのメールアドレスです。"
                  },
                  "password": {
                    "type": "string",
                    "description": "10文字以上です。"
                  }
                },
                "required": [
                  "email",
                  "password"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/buckets/{bucket}/empty": {
      "post": {
        "operationId": "empty_bucket",
        "summary": "バケットを空にする",
        "description": "バケット内のファイルをすべて削除します。バケットは残ります。元に戻せないので、ユーザーがはっきり求めたときだけ使い、confirm にバケット名をそのまま入れてください。removed が削除したファイル数です。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_bucketsのバケット名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "empty_bucket",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "バケット名です。bucketと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/buckets/{bucket}/objects": {
      "get": {
        "operationId": "list_objects",
        "summary": "ファイル一覧",
        "description": "バケット内の1つのフォルダーを表示します。サブフォルダーとファイルの名前、サイズ、形式です。prefixでフォルダーを選び（例: avatars/2024/）、searchで名前を探します。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_bucketsのバケット名です。"
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "表示するフォルダーです。空なら一番上です。"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "名前にこの語を含むものだけです。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "既定は100です。"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "飛ばす件数です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "prefix": {},
                    "total": {},
                    "objects": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_objects"
      },
      "post": {
        "operationId": "upload_object",
        "summary": "ファイルのアップロード",
        "description": "ファイルを1つバケットにアップロードします（2MBまで）。テキストはそのまま、バイナリはencodingをbase64にしてcontentにbase64を入れます。同じ名前があれば拒否し、upsertがtrueなら置き換えます。バケットのサイズと形式の制限に従います。もっと大きいファイルはストレージAPI（/storage/v1）でアップロードしてください。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_bucketsのバケット名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "name": {},
                    "size": {},
                    "mime": {},
                    "replaced": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "upload_object",
        "x-oneend-max-body-bytes": 4194304,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "ファイルの内容です（encodingがbase64ならbase64）。"
                  },
                  "name": {
                    "type": "string",
                    "description": "バケット内のパスです。例: docs/readme.txt"
                  },
                  "encoding": {
                    "type": "string",
                    "enum": [
                      "utf-8",
                      "base64"
                    ],
                    "description": "既定はutf-8です。"
                  },
                  "content_type": {
                    "type": "string",
                    "description": "例: image/png。空ならテキストまたはapplication/octet-streamです。"
                  },
                  "upsert": {
                    "type": "boolean",
                    "description": "trueなら同じ名前のファイルを置き換えます。"
                  }
                },
                "required": [
                  "content",
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/buckets/{bucket}/object": {
      "get": {
        "operationId": "download_object",
        "summary": "ファイルのダウンロード",
        "description": "ファイル1つの内容を返します（2MBまで）。テキストはutf-8、バイナリはbase64で返します。もっと大きいファイルはcreate_signed_urlでアドレスを作って受け取ってください。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_bucketsのバケット名です。"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "バケット内のパスです。"
            }
          },
          {
            "name": "encoding",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "utf-8",
                "base64"
              ],
              "description": "空なら内容に合わせて選びます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "name": {},
                    "size": {},
                    "mime": {},
                    "encoding": {},
                    "content": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "download_object"
      },
      "delete": {
        "operationId": "delete_object",
        "summary": "ファイルの削除",
        "description": "バケットからファイルを1つ削除します。元に戻せません。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_bucketsのバケット名です。"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "バケット内のパスです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "name": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "delete_object"
      }
    },
    "/projects/{ref}/buckets/{bucket}/upload-urls": {
      "post": {
        "operationId": "create_upload_url",
        "summary": "アップロードURLの作成",
        "description": "2MBより大きい画像や動画などのファイル1つをアップロードするURLを作ります。ファイルの中身はこのツールでは送りません。返された url にファイルのバイトを本文としてそのまま PUT し、content-type に形式（image/png、video/mp4 など）を入れてください（例: example の curl）。URLは2時間、その名前1つにだけ使えます。max_bytes より大きいファイルや allowed_mime_types にない形式は拒否されます。max_bytes より大きいファイルは blackwall://storage の再開可能アップロード（TUS）を使ってください。公開バケットなら public_url がアップロード後の公開アドレスです。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_buckets のバケット名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "name": {},
                    "method": {},
                    "url": {},
                    "expires_at": {},
                    "max_bytes": {},
                    "allowed_mime_types": {},
                    "public_url": {},
                    "example": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_upload_url",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "バケット内のパスです。例: videos/intro.mp4"
                  },
                  "upsert": {
                    "type": "boolean",
                    "description": "true なら同じ名前のファイルを置き換えます。既定では拒否します。"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/buckets/{bucket}/signed-urls": {
      "post": {
        "operationId": "create_signed_url",
        "summary": "署名付きURLの作成",
        "description": "非公開バケットのファイル1つを、決まった時間だけ誰でもダウンロードできるアドレスを作ります（既定1時間、最大7日）。アドレスを持つ人はログインなしで受け取れるので、必要な分だけ作ってください。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_bucketsのバケット名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "name": {},
                    "url": {},
                    "expires_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_signed_url",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "バケット内のパスです。"
                  },
                  "expires_in": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 604800,
                    "description": "有効な秒数です。既定は3600です。"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/buckets/{bucket}": {
      "patch": {
        "operationId": "update_bucket",
        "summary": "バケット設定の変更",
        "description": "バケットの公開・非公開、ファイル1つの最大サイズ、受け付ける形式を変更します。渡したものだけが変わり、残りはそのままです。公開にすると中のファイルを誰でもダウンロードできるようになるので、ユーザーがはっきり求めたときだけ使ってください。すでにあるファイルはそのままです。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_bucketsのバケット名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "public": {},
                    "file_size_limit": {},
                    "allowed_mime_types": {},
                    "files": {},
                    "bytes": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "update_bucket",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "public": {
                    "type": "boolean",
                    "description": "true なら公開、false なら非公開です。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_bucket",
        "summary": "バケットの削除",
        "description": "空のバケットを削除します。ファイルが残っていると拒否するので、先に empty_bucket で空にしてください。元に戻せません。ユーザーがはっきり求めたときだけ使い、confirm にバケット名をそのまま入れる必要があります。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "bucket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_bucketsのバケット名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "bucket": {},
                    "deleted": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "delete_bucket",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "バケット名です。bucket と完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/buckets": {
      "get": {
        "operationId": "list_buckets",
        "summary": "バケット",
        "description": "ストレージのバケットを、それぞれのファイル数とサイズとともに返します。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_buckets"
      },
      "post": {
        "operationId": "create_bucket",
        "summary": "バケットの作成",
        "description": "公開バケットは誰でも読めます。非公開バケットはアップロードした本人だけが読めます。",
        "tags": [
          "storage"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bucket": {},
                    "public": {},
                    "file_size_limit": {},
                    "allowed_mime_types": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_bucket",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9._-]{1,62}$",
                    "description": "バケット名です。英小文字、数字、「. _ -」で2〜63文字です。"
                  },
                  "public": {
                    "type": "boolean",
                    "description": "既定は非公開です。"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/deployments/sources/upload-urls": {
      "post": {
        "operationId": "create_source_upload_url",
        "summary": "デプロイ用アーカイブのアップロードURLの作成",
        "description": "deploy_files に収まらない大きなサイト（3MB 超）をリポジトリなしでデプロイするときに使います。アーカイブ（.zip、.tar、.tar.gz）1つをアップロードするURLを作ります。アーカイブの中身はこのツールでは送りません。返された url にアーカイブを本文としてそのまま PUT すると（例: example の curl、トークンなし）答えに source が返り、その source で deploy_source を呼ぶとデプロイされます。URLは1時間、このプロジェクトにだけ使え、max_bytes まで受け付けます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "method": {},
                    "url": {},
                    "expires_at": {},
                    "max_bytes": {},
                    "formats": {},
                    "example": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_source_upload_url"
      }
    },
    "/projects/{ref}/deployments/sources": {
      "post": {
        "operationId": "post_projects_ref_deployments_sources",
        "summary": "デプロイするファイルのアップロード",
        "description": "リポジトリなしでデプロイするファイルを、1 つのアーカイブ（`.zip`、`.tar`、`.tar.gz`）として本文にそのまま送ります。内容のダイジェストで保存され、デプロイは次に `POST /deployments` へ `{\"source\": \"<digest>\"}` を送って作成します。同じバイトをプレビューと本番にデプロイできます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-max-body-bytes": 52428800,
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "contentMediaType": "application/octet-stream"
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/deployments": {
      "post": {
        "operationId": "post_projects_ref_deployments",
        "summary": "デプロイの作成",
        "description": "本文の内容によって 3 種類あります。`source` は `POST /deployments/sources` で送ったアーカイブのダイジェスト、`files`（または `files_base64`）はパスごとのファイル内容です。どちらもなければ `app`、`branch`、`commit` でリポジトリのコミットをビルドします。`target` が `production` なら本番、それ以外はプレビューです。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "deploy_source",
        "x-oneend-max-body-bytes": 4194304,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "アップロード時に受け取ったsourceです（64文字のSHA-256）。"
                  },
                  "files": {
                    "type": "string"
                  },
                  "files_base64": {
                    "type": "string"
                  },
                  "app": {
                    "type": "string",
                    "description": "デプロイするアプリです（list_appsのname）。アプリが1つなら省略します。"
                  },
                  "branch": {
                    "type": "string",
                    "description": "プレビューの名前で、プレビューのアドレスになります。既定はpreviewです。"
                  },
                  "commit": {
                    "type": "string"
                  },
                  "wait": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 120,
                    "description": "ビルドが終わる（ready・error）まで待つ秒数です。既定の0はすぐに応答します。時間内に終わらなければ still_running: true と retry_after_seconds が返ります。MCP クライアントはたいてい60秒ほどで呼び出しをあきらめるので、45程度が安全です。"
                  },
                  "block_on_advisors": {
                    "type": "boolean",
                    "description": "trueなら、get_advisors の重大なセキュリティ問題（advisors.critical）が1つでもある間、プロダクションへのデプロイを拒否します。既定のfalseはデプロイし、件数と上位3件を advisors で知らせます。プレビューは止めません。"
                  },
                  "prebuilt": {
                    "type": "boolean",
                    "description": "trueならビルドせずにそのまま配信します。"
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "preview",
                      "production"
                    ],
                    "description": "既定はpreviewです。"
                  },
                  "message": {
                    "type": "string",
                    "description": "デプロイ一覧に残すメモです（任意）。"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list_deployments",
        "summary": "デプロイ",
        "description": "このプロジェクトの最近のデプロイを新しい順に表示します。状態（queued、building、ready、error）、環境、アドレス、ブランチ、コミット、失敗した理由が含まれます。削除したデプロイは含まれません（list_deleted_deployments で表示）。next_before があれば before に渡すと次のページを表示します。url はそのデプロイ固有の dpl- アドレス、production_url はプロダクションのアドレス、preview_url はそのブランチのプレビューのアドレスです。 preview_protection はプレビューのアドレスを誰が開けるかです（members: 組織のメンバーのみ、既定 / password / off: 誰でも）。プロダクションのアドレスは常に公開なので null ですが、保護がオンなら dpl- アドレスはプロダクションのビルドでも保護されます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "既定は20件です。"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^dpl-[0-9a-f]{16}$",
              "description": "このデプロイの次から（古い方）。前のページの next_before。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "preview_protection": {},
                    "deployments": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_deployments"
      }
    },
    "/projects/{ref}/deployments/{id}/redeploy": {
      "post": {
        "operationId": "redeploy",
        "summary": "再デプロイ",
        "description": "あるデプロイと同じコミットを、同じ環境にもう一度ビルドします。コミットとは関係のない理由（後から追加した環境変数、一時的に落ちていたパッケージレジストリ）で失敗したビルドをやり直すときに使います。プロダクションへのデプロイはオーナーと管理者のみ行えます。応答に新しいデプロイのアドレス（url、preview_url・production_url）とセキュリティチェックの結果（advisors）が含まれます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "dpl-で始まるデプロイ名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "status": {},
                    "environment": {},
                    "preview_protection": {},
                    "advisors": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "redeploy"
      }
    },
    "/projects/{ref}/deployments/{id}/promote": {
      "post": {
        "operationId": "promote_deployment",
        "summary": "プレビューをプロダクションに昇格",
        "description": "完了したプレビューデプロイをプロダクションに移します。同じコミットをプロダクションの環境変数でもう一度ビルドし、完了するとプロダクションのアドレスがその結果を指します。プレビューのキーがプロダクションに届かないよう、プレビューのビルドは再利用しません。完了したプロダクションデプロイを渡すと、再ビルドせずにプロダクションのアドレスがすぐそれを指し、ロールバックによるプロダクションの保留（production_held）が解除されます。いま配信中のデプロイを渡すと保留だけ解除されます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "昇格するデプロイのdpl-名です。通常はプレビュー、保留を解除するときはプロダクションのデプロイです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "status": {},
                    "environment": {},
                    "preview_protection": {},
                    "advisors": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)",
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "promote_deployment"
      }
    },
    "/projects/{ref}/deployments/{id}/rollback": {
      "post": {
        "operationId": "rollback_deployment",
        "summary": "プロダクションのロールバック",
        "description": "以前に配信していたプロダクションデプロイへ、プロダクションのアドレスを直接戻します。再ビルドはせず、数秒で切り替わります。カスタムドメインも追従します。応答にそのデプロイの url と production_url が含まれます。その後プロダクションは保留されます（production_held）: 新しいプロダクションビルドは作られますが、promote_deployment で昇格するまで配信されません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "戻す先のプロダクションデプロイのdpl-名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "status": {},
                    "production_held": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "rollback_deployment"
      }
    },
    "/projects/{ref}/deploy-hooks": {
      "get": {
        "operationId": "list_deploy_hooks",
        "summary": "デプロイフック",
        "description": "デプロイフックとそのアドレスを表示します。アドレスにPOSTするとそのブランチの最新コミットをビルドするため、アドレス自体がシークレットです。読み取り権限のトークンには各アドレスの末尾4文字だけを表示します（secret_hidden）。書き込み権限のトークンならすべて表示します。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "hooks": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "list_deploy_hooks"
      },
      "post": {
        "operationId": "create_deploy_hook",
        "summary": "デプロイフックの作成",
        "description": "pushなしでビルドを起動するアドレスを作成します。CMSで記事を公開したときや、予約ジョブから呼び出してください。プロダクションブランチのフックはオーナーと管理者のみ作成できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_deploy_hook",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app": {
                    "type": "string",
                    "description": "list_appsの名前です。"
                  },
                  "branch": {
                    "type": "string",
                    "description": "最新コミットをビルドするブランチです。"
                  },
                  "name": {
                    "type": "string",
                    "description": "フックを見分けるための名前です。"
                  }
                },
                "required": [
                  "app",
                  "branch"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/deploy-hooks/{id}": {
      "delete": {
        "operationId": "remove_deploy_hook",
        "summary": "デプロイフックの削除",
        "description": "デプロイフックを削除します。そのアドレスを呼び出していたものは、もうデプロイを起こしません。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_deploy_hooksのidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_deploy_hook"
      }
    },
    "/projects/{ref}/deployment-retention": {
      "get": {
        "operationId": "get_deployment_retention",
        "summary": "デプロイの保存期間",
        "description": "キャンセル・失敗・プレビュー・本番のデプロイを何日残すかを返します。いま適用される日数（days）、プロジェクトが決めた値（project_days、null ならプランに従う）、プランの既定値（plan_days）。期間にかかわらず残すデプロイ（always_kept）と、削除したデプロイを復元できる日数（restore_days）もあります。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "canceled": {},
                    "error": {},
                    "preview": {},
                    "production": {},
                    "always_kept": {},
                    "restore_days": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_deployment_retention"
      },
      "put": {
        "operationId": "set_deployment_retention",
        "summary": "デプロイの保存期間を変更",
        "description": "デプロイの種類ごとの保存期間を変えます。期間を過ぎたデプロイは削除され、3日間は restore_deployment で復元できます。直近のデプロイと配信中のデプロイは期間にかかわらず残ります。プロジェクト管理者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_deployment_retention",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "canceled_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "キャンセル・スキップしたデプロイを残す日数（1〜3650）。null でプランの既定値。指定しなければそのまま。"
                  },
                  "error_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "失敗したデプロイを残す日数（1〜3650）。null でプランの既定値。指定しなければそのまま。"
                  },
                  "preview_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "プレビューのデプロイを残す日数（1〜3650）。null でプランの既定値。指定しなければそのまま。"
                  },
                  "production_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "本番のデプロイを残す日数（1〜3650）。null でプランの既定値。指定しなければそのまま。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/deployments/deleted": {
      "get": {
        "operationId": "list_deleted_deployments",
        "summary": "最近削除したデプロイ",
        "description": "3日以内に削除されたデプロイ（手動で削除したものと保存期間が過ぎたもの）と、復元できる期限（restorable_until）を返します。その間、そのデプロイのアドレスは 410 を返します。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "deployments": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_deleted_deployments"
      }
    },
    "/projects/{ref}/deployments/{id}": {
      "delete": {
        "operationId": "delete_deployment",
        "summary": "デプロイを削除",
        "description": "デプロイを 1 つ削除します。配信中とビルド中のデプロイは削除できません。3日間は restore_deployment で復元でき、その後ファイルとビルドログを消去します。本番のデプロイはプロジェクト管理者、それ以外は開発者以上が実行できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^dpl-[0-9a-f]{16}$",
              "description": "デプロイの id（dpl-…）。list_deployments か list_deleted_deployments で確認します。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "deleted": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "delete_deployment"
      },
      "get": {
        "operationId": "get_deployment",
        "summary": "デプロイ1件とビルドログ",
        "description": "デプロイ1件の状態、アドレス、ビルドログの末尾を表示します。ビルドが失敗した場合、理由はたいていログの最後の数行にあります。お客様が設定した環境変数の値は••••••で伏せられます。url はそのデプロイ固有の dpl- アドレス、production_url・preview_url はプロダクションやそのブランチのアドレスです。 preview_protection はプレビューのアドレスを誰が開けるかです（members: 組織のメンバーのみ、既定 / password / off: 誰でも）。プロダクションのアドレスは常に公開なので null です。wait（秒）を渡すとビルドが終わるまで待ちます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "dpl-で始まるデプロイ名です。"
            }
          },
          {
            "name": "tail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5000,
              "description": "ビルドログの末尾から何行表示するかです。既定は200行です。"
            }
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 120,
              "description": "ビルドが終わる（ready・error）まで待つ秒数です。既定の0はすぐに応答します。時間内に終わらなければ still_running: true と retry_after_seconds が返ります。MCP クライアントはたいてい60秒ほどで呼び出しをあきらめるので、45程度が安全です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preview_protection": {},
                    "build_log": {},
                    "build_log_lines": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_deployment"
      }
    },
    "/projects/{ref}/deployments/{id}/restore": {
      "post": {
        "operationId": "restore_deployment",
        "summary": "デプロイを復元",
        "description": "3日以内に削除されたデプロイを復元します。このデプロイのアドレスが再び応答し、ロールバックや昇格ができるようになります。本番のデプロイはプロジェクト管理者、それ以外は開発者以上が実行できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^dpl-[0-9a-f]{16}$",
              "description": "デプロイの id（dpl-…）。list_deployments か list_deleted_deployments で確認します。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "restored": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "restore_deployment"
      }
    },
    "/projects/{ref}/domains": {
      "get": {
        "operationId": "list_domains",
        "summary": "ドメイン",
        "description": "このプロジェクトに接続したドメインを表示します。それぞれの用途（site/api）、追従するブランチ、リダイレクト先、検証状態（未検証なら追加すべきTXTレコード）、証明書の状態が含まれます。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "domains": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_domains"
      },
      "post": {
        "operationId": "add_domain",
        "summary": "ドメインの接続",
        "description": "ドメインを接続します。返されたverification_record（TXT）をDNSに追加すると、数分以内に検証されます。target=apiにすると、そのアドレスはプロジェクトAPI（データ、ログイン、ストレージ）として応答します。branchを指定すると、そのブランチのプレビューに追従します。*.example.comのようなワイルドカードも使えます。pair_www=trueにするとwwwのアドレスも接続し、一方をもう一方へリダイレクトします。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "domains": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "add_domain",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hostname": {
                    "type": "string",
                    "description": "例: example.com、api.example.com、*.example.com"
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "site",
                      "api"
                    ],
                    "description": "デプロイしたサイトならsite、プロジェクトAPIならapiです。"
                  },
                  "branch": {
                    "type": "string",
                    "description": "サイトのみです。空の場合はプロダクションです。"
                  },
                  "pair_www": {
                    "type": "boolean",
                    "description": "wwwのアドレスも接続し、一方をもう一方へリダイレクトします。"
                  },
                  "app": {
                    "type": "string",
                    "description": "アプリ名（list_appsのname）です。空の場合はプロジェクトのサイト（project_siteがtrueのアプリ）です。"
                  }
                },
                "required": [
                  "hostname"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/domains/{hostname}": {
      "delete": {
        "operationId": "remove_domain",
        "summary": "ドメインの接続解除",
        "description": "ドメインの接続を解除します。そのアドレスは数秒以内に応答しなくなります。ユーザーがはっきり求めたときだけ使い、confirm にドメインをそのまま入れてください。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "hostname",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "接続済みのドメインです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "domains": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_domain",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "ドメインです。hostnameと同じである必要があります（大文字と小文字は区別しません）。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/domains/{hostname}/redirect": {
      "put": {
        "operationId": "set_domain_redirect",
        "summary": "ドメインのリダイレクト",
        "description": "このドメインを同じプロジェクトの別のドメインへリダイレクトさせます。toを空にすると、再びサイトを配信します。toにパスを付けると(example.com/vision)、アクセスしたパスがその後ろに付き、クエリ文字列もそのまま引き継がれます: vision.example.com/x?y=1 → example.com/vision/x?y=1、トップページは example.com/vision。toのドメインは、このプロジェクトに接続した、リダイレクトではないドメインである必要があります。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "hostname",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "リダイレクトするドメインです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "domains": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_domain_redirect",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "description": "ドメイン、またはドメインとパスです(例: example.com/vision)。空にするとリダイレクトをオフにします。"
                  },
                  "status": {
                    "type": "integer",
                    "enum": [
                      308,
                      307,
                      301,
                      302
                    ],
                    "description": "ステータスコードです。既定は 308(恒久、メソッドを維持)。省くと今の値のままです。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/edge": {
      "get": {
        "operationId": "get_edge",
        "summary": "ファイアウォールとキャッシュ",
        "description": "このプロジェクトのIP拒否リストと許可リスト、1つのアドレスからの1分あたりのリクエスト上限、その適用対象、最後にキャッシュを消去した時刻を表示します。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "deny": {},
                    "allow": {},
                    "rate_per_minute": {},
                    "scope": {},
                    "cache_purged_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_edge"
      },
      "put": {
        "operationId": "set_edge",
        "summary": "ファイアウォールの変更",
        "description": "IP拒否リスト、許可リスト（空なら全員を許可）、1分あたりのリクエスト上限（10〜100000、nullならプラットフォームの既定値）、適用対象（all/site/api）を変更します。指定した項目だけが変わります。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "deny": {},
                    "allow": {},
                    "rate_per_minute": {},
                    "scope": {},
                    "cache_purged_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_edge",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deny": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "拒否するIPアドレスまたはCIDR範囲です。"
                  },
                  "allow": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "許可するIPアドレスまたはCIDR範囲です。空なら全員を許可します。"
                  },
                  "rate_per_minute": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "1つのアドレスからの1分あたりのリクエスト数です。10〜100000。nullならプラットフォームの既定値です。"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "all",
                      "site",
                      "api"
                    ],
                    "description": "ルールの適用対象です: all、site、api。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/edge/purge": {
      "post": {
        "operationId": "purge_edge_cache",
        "summary": "キャッシュの消去",
        "description": "サーバーデプロイがs-maxageで共有を許可したためにエッジに保存されている応答をすべて破棄します。次のリクエストから、デプロイが再び応答します。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "deny": {},
                    "allow": {},
                    "rate_per_minute": {},
                    "scope": {},
                    "cache_purged_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "purge_edge_cache"
      }
    },
    "/projects/{ref}/branch-previews": {
      "get": {
        "operationId": "get_branch_previews",
        "summary": "ブランチプレビュー",
        "description": "このプロジェクトの組織で、本番ブランチ以外へのプッシュでプレビューをビルドするかを表示します（branch_previews）。false なら本番ブランチ (通常は main) に入ったものだけをビルドします。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "organization": {},
                    "branch_previews": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_branch_previews"
      },
      "put": {
        "operationId": "set_branch_previews",
        "summary": "ブランチプレビューの変更",
        "description": "組織全体で、ブランチへのプッシュごとにプレビューをビルドするかを決めます。false なら本番ブランチ (通常は main) に入ったものだけをビルドし、スキップしたプッシュはデプロイ履歴にスキップとして残ります。再デプロイ、直接アップロードしたデプロイ、デプロイフックは通常どおりビルドします。この組織のすべてのプロジェクトに適用されます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "organization": {},
                    "branch_previews": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_branch_previews",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "true ならブランチへのプッシュごとにプレビューをビルドします。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/preview-protection": {
      "get": {
        "operationId": "get_preview_protection",
        "summary": "プレビューの保護",
        "description": "プロダクション以外のデプロイ（ブランチのプレビュー、デプロイごとのアドレス）を誰が開けるかを表示します: off、members（組織のメンバーのみ）、password。保護するアドレス（scope）、サインインなしで通す IP（trusted_ips）、確認せずに通すパス（options_paths）、バイパスキー（bypass_secrets、値は末尾4文字のみ）、共有リンク（share_links）も返します。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "mode": {},
                    "has_password": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_preview_protection"
      },
      "put": {
        "operationId": "set_preview_protection",
        "summary": "プレビューの保護の変更",
        "description": "プレビューを開ける人を変更します。membersはコンソールにログインした組織のメンバー、passwordは共有のパスワード1つ（初回は8文字以上のパスワードが必要）、offは誰でもです。プロダクションのアドレスと接続済みのドメインは常に公開です。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_preview_protection",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "off",
                      "members",
                      "password"
                    ],
                    "description": "off、members、passwordのいずれかです。"
                  },
                  "password": {
                    "type": "string",
                    "description": "modeがpasswordのときです。空なら設定済みのパスワードを保ちます。"
                  }
                },
                "required": [
                  "mode"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/apps": {
      "get": {
        "operationId": "list_apps",
        "summary": "接続済みリポジトリとビルド設定",
        "description": "このプロジェクトにデプロイするリポジトリごとに、プロダクションブランチ、ビルドするフォルダー（root_directory）、フレームワークプリセット（framework。nullなら自動検出）と、ビルドコマンド・出力ディレクトリ・インストールコマンドの上書き（build_command、output_directory、install_command。nullならプリセットの既定値）を表示します。detected_frameworkは最新のビルドが使ったフレームワーク、frameworksは選べるプリセットの一覧です。リポジトリは最初のpushで表示されます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "apps": {},
                    "frameworks": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_apps"
      }
    },
    "/projects/{ref}/apps/{name}": {
      "delete": {
        "operationId": "delete_app",
        "summary": "アプリの削除",
        "description": "プロジェクトのアプリ1つを削除します（モノレポでフォルダーをなくしたアプリ）。アドレスはすぐに応答しなくなり、進行中のビルドは取り消され、デプロイは復元できない形で削除され、ファイルは数分以内に消えます。リポジトリにフォルダーが残っていても、プッシュで再びビルドしません。元に戻せません。プロジェクトの既定のサイト、ドメインがつながったアプリ、ディスクのあるアプリは断り、先にすることを伝えます。ユーザーがはっきり求めたときだけ使い、confirmにアプリ名をそのまま入れてください。オーナーと管理者だけが実行できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_appsのname。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "delete_app",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "アプリ名。nameとまったく同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "update_app",
        "summary": "ビルド設定の変更",
        "description": "リポジトリ1つのプロダクションブランチ、ビルドするフォルダー、フレームワークプリセット、ビルドコマンド・出力ディレクトリ・インストールコマンドを変更します。モノレポの場合は、アプリのフォルダー（例: apps/web）をroot_directoryに指定してください。指定しなかった値はそのまま残り、nullを指定すると自動検出（プリセットの既定値）に戻ります。コマンドに空文字列を指定すると、その手順を飛ばします。リポジトリのblackwall.jsonに同じ項目があれば、そちらが優先されます。次のデプロイから反映されます。ただしport（サーバーが待ち受けるポート）は1分以内にサーバーを再起動して反映します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_appsの名前です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "update_app",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "production_branch": {
                    "type": "string",
                    "description": "プロダクションにデプロイするブランチです。"
                  },
                  "root_directory": {
                    "type": "string",
                    "description": "リポジトリからの相対パスです。リポジトリ全体なら\".\"です。"
                  },
                  "run_as": {
                    "type": "string",
                    "enum": [
                      "platform",
                      "image"
                    ],
                    "description": "サーバーを誰として実行するかです。platform（既定）は一般ユーザー（10001）、image はイメージが指定するユーザー（root を含む）で gVisor の分離環境の中で実行します。公式 WordPress イメージのように root で起動する必要がある Dockerfile アプリにだけ image を使ってください。再ビルドなしで1分以内にサーバーが再起動します。"
                  },
                  "port": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 65535,
                    "description": "サーバーがコンテナ内で待ち受けるポートです。nullならイメージのEXPOSE、なければ3000です。変更すると1分以内にサーバーが再起動します（再デプロイは不要です）。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/logs": {
      "get": {
        "operationId": "get_logs",
        "summary": "ログ",
        "description": "プロジェクトで起きたことを新しい順に表示します。サイト、API、ログイン、関数へのリクエスト（メソッド、パス、ステータス、所要時間）と、デプロイしたサーバーや関数が出力した行です。アプリが500を返す場合は、まずlevelをerrorにしてここを見てください。次のページは、応答のnext_beforeをbeforeに渡します。クエリ文字列は保存しません。",
        "tags": [
          "logs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "site",
                "server",
                "api",
                "auth",
                "functions",
                "build"
              ],
              "description": "行の出どころです: site、server、api、auth、functions、build。"
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "warn",
                "error"
              ],
              "description": "警告とエラーならwarn、エラーだけならerrorです。"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "この時刻より古い行だけです。前回の応答のnext_beforeです。"
            }
          },
          {
            "name": "deployment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "description": "既定は100行です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "lines": {},
                    "next_before": {},
                    "retention_days": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_logs"
      }
    },
    "/projects/{ref}/rows/{table}": {
      "get": {
        "operationId": "read_rows",
        "summary": "テーブルの読み取り",
        "description": "テーブルの先頭の行をそのまま読みます。確認用です。条件が必要な場合はrun_sqlを使ってください。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "テーブル名です。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "description": "既定は50行です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {},
                    "rows": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "read_rows"
      }
    },
    "/projects/{ref}/migrations": {
      "get": {
        "operationId": "list_migrations",
        "summary": "マイグレーションの記録",
        "description": "apply_migrationsで適用したマイグレーションのバージョン、名前、適用時刻を古い順に返します。記録はプロジェクトのoneend_migrationsテーブルにあります。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "ledger": {},
                    "migrations": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_migrations"
      },
      "post": {
        "operationId": "apply_migrations",
        "summary": "マイグレーションの適用",
        "description": "まだ適用していないマイグレーションをバージョン順に、1つずつそれぞれのトランザクションで実行し、記録します。すでに適用されたバージョンは飛ばします。1つが失敗すると、それだけを元に戻して止まり、前のものは適用されたまま残ります。スキーマを変更するときにrun_sqlの代わりにこれを使うと、同じ変更をほかのプロジェクトにもそのまま適用し直せます。supabase/migrationsのファイルをそのまま送れます: public.、auth.uid()、storage.、to authenticatedなどのSupabaseの名前はこのプロジェクトの名前に変換して実行し、translatedで返します(Supabase名の変換)。適用記録にはファイルのとおりに残ります。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "applied": {},
                    "recorded_only": {},
                    "already_applied": {},
                    "drifted": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "apply_migrations",
        "x-oneend-max-body-bytes": 8388608,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "migrations": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "string",
                          "pattern": "^[0-9]{1,32}$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "sql": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "version",
                        "sql"
                      ],
                      "additionalProperties": false
                    },
                    "description": "マイグレーションの一覧です。それぞれversion、name、sqlを持ちます。"
                  },
                  "include_all": {
                    "type": "boolean",
                    "description": "すでに適用された最後のバージョンより前のバージョンも適用します。既定はfalseです。"
                  },
                  "record_only": {
                    "type": "boolean",
                    "description": "実行せず、適用したものとして記録だけします。既定はfalseです。"
                  },
                  "dry_run": {
                    "type": "boolean",
                    "description": "何が適用されるかだけを知らせます。"
                  }
                },
                "required": [
                  "migrations"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/migrations/{version}": {
      "delete": {
        "operationId": "remove_migration_record",
        "summary": "マイグレーションの記録の削除",
        "description": "マイグレーションを1つ、適用していない状態に戻します。記録だけを削除し、そのマイグレーションが作ったものはそのまま残します。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,32}$",
              "description": "list_migrationsのバージョンです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "version": {},
                    "removed": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_migration_record"
      }
    },
    "/projects/{ref}/schema": {
      "get": {
        "operationId": "dump_schema",
        "summary": "スキーマをSQLで",
        "description": "プロジェクトのスキーマ（型、シーケンス、テーブルと制約、外部キー、インデックス、関数、ビュー、トリガー、RLSとルール）を作り直せるSQLとして返します。行のデータと権限は含まれません。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "sql": {},
                    "objects": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "dump_schema"
      }
    },
    "/projects/{ref}/types/typescript": {
      "get": {
        "operationId": "generate_typescript_types",
        "summary": "TypeScriptの型を作る",
        "description": "プロジェクトのテーブル、ビュー、関数、列挙型から、supabase-jsのcreateClient<Database>()に渡すDatabase型を作ります。スキーマを変更したあとに、もう一度呼び出してください。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "schema",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "既定はpublicです。プロジェクトが作ったスキーマ（list_schemasのname）も使えます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "schema": {},
                    "types": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "generate_typescript_types"
      }
    },
    "/projects/{ref}/sql/query": {
      "post": {
        "operationId": "query_sql",
        "summary": "SQLの照会（読み取り専用）",
        "description": "プロジェクトのPostgreSQLデータベースで照会文1つ（SELECTなど）を読み取り専用トランザクションで実行し、結果の行を返します。データや構造を変更する文は拒否されるため、その場合はrun_sqlを使ってください。読み取り権限のトークンでも呼び出せます。Vaultのシークレットの値は開きません（vault.decrypted_secretsのdecrypted_secretは空です）。SQLの文法はPostgreSQL 16のドキュメント（https://www.postgresql.org/docs/16/sql-commands.html）に従います。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "query_sql",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sql": {
                    "type": "string",
                    "description": "実行する照会文1つです。"
                  }
                },
                "required": [
                  "sql"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/sql": {
      "post": {
        "operationId": "run_sql",
        "summary": "SQLの実行（変更）",
        "description": "プロジェクトのPostgreSQLデータベースでデータや構造を変更するSQL（CREATE、INSERT、UPDATE、DELETEなど）を実行し、結果の行を返します。照会だけの場合はquery_sqlを使ってください。SQLの文法はPostgreSQL 16のドキュメント（https://www.postgresql.org/docs/16/sql-commands.html）に従います。新しいテーブルはアクセスルールが自動でオンになるため、続けてルールを作成しない限り、パブリッシャブルキーからは何も見えません。ルールで使うロール名は<ref>_anon、<ref>_authenticated、<ref>_service_roleです。Supabase向けに書いたSQL(public.、auth.uid()、storage.、to authenticated)はこのプロジェクトの名前に変換して実行し、何を変換したかをtranslatedで返します(Supabase名の変換)。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "run_sql",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sql": {
                    "type": "string",
                    "description": "実行するSQL文1つです。"
                  }
                },
                "required": [
                  "sql"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/users/{id}/links": {
      "post": {
        "operationId": "generate_link",
        "summary": "ログインリンクの作成",
        "description": "メールで送られるリンクを、メールを送らずに作って返します。invite（招待。いなければユーザーを作成）、magiclink（パスワードなしのログイン）、recovery（パスワードの再設定）、signup（新規登録の確認。password が必要）です。action_link を開いた人はそのユーザーとしてログインするので、パスワードと同じです。ユーザーがはっきり求めたときだけ作り、その人にだけ渡してください。redirect_to は add_redirect_url で登録したアドレスである必要があります。シークレットキーを見られるロール（オーナー、管理者、開発者）だけが行えます。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ユーザーのメールアドレスです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "type": {},
                    "user_id": {},
                    "email": {},
                    "action_link": {},
                    "email_otp": {},
                    "redirect_to": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "generate_link",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "invite",
                      "magiclink",
                      "recovery",
                      "signup"
                    ],
                    "description": "invite、magiclink、recovery、signup のいずれかです。"
                  },
                  "password": {
                    "type": "string",
                    "description": "signup のとき、新しいユーザーのパスワードです（10文字以上）。"
                  },
                  "data": {
                    "type": "object",
                    "description": "invite、signup、magiclink で新しく作るユーザーのメタデータです。"
                  },
                  "redirect_to": {
                    "type": "string",
                    "description": "確認後に戻るアドレスです。list_redirect_urls にあるものだけです。"
                  }
                },
                "required": [
                  "type"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/users/{id}": {
      "patch": {
        "operationId": "update_user",
        "summary": "ユーザーの変更",
        "description": "このプロジェクトのユーザー1人を変更します。メールアドレス、パスワード、メールの確認、利用停止とその解除、メタデータです。渡したものだけが変わります。パスワードを変えるか停止すると、その人のログインはすべて切れます。パスワードは10文字以上で、漏えいしたことのあるものは拒否されます。メタデータは既存の値にマージされます。ユーザーがはっきり求めたときだけ使ってください。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_users の id（UUID）です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "user": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "update_user",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "新しいメールアドレスです。"
                  },
                  "password": {
                    "type": "string",
                    "description": "新しいパスワードです（10文字以上）。"
                  },
                  "email_confirm": {
                    "type": "boolean",
                    "description": "true ならメールアドレスを確認済みにします。"
                  },
                  "ban_duration": {
                    "type": "string",
                    "description": "停止期間です。例: 24h、30m、876000h（事実上の永久）。none なら停止を解除します。"
                  },
                  "user_metadata": {
                    "type": "object",
                    "description": "ユーザーが変更できるメタデータにマージする値です。"
                  },
                  "app_metadata": {
                    "type": "object",
                    "description": "サーバーだけが変更するメタデータにマージする値です（ロール、プランなど）。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_user",
        "summary": "ユーザーの削除",
        "description": "プロジェクトのユーザーを1人削除します。元に戻せません。idはlist_usersが返した値です。ユーザーがはっきり求めたときだけ使い、confirm にそのユーザーのメールアドレス（またはid）をそのまま入れてください。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_usersのid（UUID）です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_user",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "削除するユーザーのメールアドレスまたはidです。list_usersのemailかidと同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/users/import": {
      "post": {
        "operationId": "import_users",
        "summary": "ユーザーの一括インポート",
        "description": "別のサービス（例: Supabase の auth.users エクスポート）のユーザーを一度に500人まで取り込みます。id と bcrypt のパスワードハッシュはそのまま保たれるため、パスワードを決め直す必要はありません。先にリスト全体を検査し、誤りのある行は番号で示して何も取り込みません。すでにあるアカウントはスキップするので、再実行しても安全です。dry_run=true なら検査のみです。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "dry_run": {},
                    "found": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "import_users",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "users": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "encrypted_password": {
                          "type": "string"
                        },
                        "email_confirmed": {
                          "type": "boolean"
                        },
                        "user_metadata": {
                          "type": "object"
                        },
                        "app_metadata": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "email"
                      ],
                      "additionalProperties": false
                    },
                    "description": "アカウントのリストです: { email, id?, encrypted_password?, email_confirmed?, user_metadata?, app_metadata? }。"
                  },
                  "dry_run": {
                    "type": "boolean",
                    "description": "リストを検査するだけで、何も取り込みません。"
                  }
                },
                "required": [
                  "users"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/retry-provisioning": {
      "post": {
        "operationId": "retry_provisioning",
        "summary": "準備に失敗したプロジェクトの再試行",
        "description": "データベースを作成できなかったプロジェクトの準備をやり直します。ほかのツールが「作成できませんでした」と拒否したときに使ってください。新しいプロジェクトは作成しないでください。これは同じプロジェクトの準備を続けるもので、新しく作ると請求が二重になるだけです。",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "retried": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "retry_provisioning"
      }
    },
    "/projects/{ref}/functions": {
      "get": {
        "operationId": "list_functions",
        "summary": "関数",
        "description": "デプロイされた関数を、それぞれの呼び出しアドレスと公開かどうかとともに表示します。egressは外部リクエストがオンかどうか、outbound_requests_per_minuteは関数・pg_net・HTTPジョブが共有する1分あたりの外部リクエストの上限です（自分のAPIへの呼び出しは数えません）。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "functions": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_functions"
      }
    },
    "/projects/{ref}/functions/{name}": {
      "get": {
        "operationId": "get_function",
        "summary": "関数のコードを読む",
        "description": "デプロイされた関数のコードとバージョンを表示します。変更する前に、今のコードを読んでください。deploy_function が status \"building\" で応答したときは、build.status（building・deployed・failed）と build.error で結果を確認します。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "関数名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "status": {},
                    "public": {},
                    "version": {},
                    "url": {},
                    "updated_at": {},
                    "bundled": {},
                    "bytes": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_function"
      },
      "put": {
        "operationId": "deploy_function",
        "summary": "関数のデプロイ",
        "description": "関数を1つデプロイします。同じ名前の関数があれば丸ごと置き換え、次の呼び出しから新しいコードが動きます。 コードはTypeScriptファイル1つで、export defaultで (request, { sql }) => 応答 をエクスポートします。 requestにはmethod、headers、claims（呼び出したキーのクレーム。roleはanon・authenticated・service_role。キーなしで呼んだ公開関数ではnull）、text()、json()があります。 sql(text, values)はこのプロジェクトのservice_role権限でSQL文を1つ実行し、行の配列を返します。 応答はオブジェクト（JSONとして送信）、文字列、または { status, headers, body } です。 npmパッケージを使うには、dependencies（{\"zod\":\"^3.23.8\"}）またはpackage_json（文字列）を一緒に送ってください。 デプロイ時にインストールし、コードと一緒に1つのESMファイルにまとめます（最大5MB、インストールスクリプトは実行しません、ネイティブモジュールは使えません）。一度インストールしたパッケージの組み合わせは再利用するので、2回目からのデプロイは数秒で終わります。 40秒以内に終わらないときは、すぐに status \"building\" で応答し、サーバーでデプロイを続けます。そのときは get_function をもう一度呼び、build.status が deployed か failed になるまで確認してください。 複数のファイルはfiles（{\"lib/util.ts\": \"...\"}）で一緒に送り、相対パスでimportします。フォルダーを丸ごと送るには、sourceを空にしてindex.tsを含むすべてをfilesに入れます。 Supabaseと同じように、deno.json（またはimport_map.json）のimportsとnpm:・jsr:・URLのimport（例: npm:zod@3、jsr:@supabase/supabase-js@2、https://esm.sh/…、https://deno.land/std@0.177.0/http/server.ts）を使えます。npm:・jsr:・esm.shはデプロイ時にnpmパッケージとしてインストールし、それ以外のURLはデプロイ時に一度だけ取得してコードと一緒にまとめます（取得したアドレスとSHA-256はget_functionのremote_importsにあり、deno.lockがあればそのハッシュと一致する必要があります）。実行中には何も取得しません。 Supabaseのsupabase/functions/<名前>/フォルダーのように../_shared/cors.tsをimportするときは、filesに\"../_shared/cors.ts\"として一緒に入れてください。関数フォルダーの隣のフォルダーまでです。 1回の呼び出しは150秒まで実行できます（Supabaseと同じ）。変えるにはset_function_limitsを使ってください。 呼び出した人のAuthorizationヘッダー（このプロジェクトのキーの場合）がそのまま関数に届くので、createClient(url, anonKey, { global: { headers: { Authorization: req.headers.get('Authorization') } } })がその人として動作します。 バンドルされた関数を変更するときは、get_functionが返したpackage_jsonとfilesをそのまま送り直してください。省くとファイル1つだけの関数になります。 ネットワークは既定で無効で、set_function_egressで有効にできます。 プロダクションの環境変数がprocess.envに入ります。関数のデプロイはオーナーと管理者のみ行えます。 呼び出せる人: 非公開（既定）の関数には、このプロジェクトのキーが必要です: 公開キー（claims.role anon）、ログインしたユーザーのトークン（authenticated）、シークレットキー（service_role）。Supabaseのverify_jwtと同じなので、supabase.functions.invokeと公開キーを付けたfetchはそのまま動きます。ログインしたユーザーだけを受け付けるには、関数の中でrequest.claims.roleを確認してください。 publicをtrueにすると、キーなしでも誰でも呼び出せます。決済事業者のWebhookのように、キーなしで届くリクエストにだけ使ってください。 呼び出し: POST https://<ref>.<zone>/functions/v1/<name>、ヘッダーAuthorization: Bearer <公開キー、ユーザートークンまたはシークレットキー>。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "英小文字で始まり、英小文字、数字、ハイフンで構成します。呼び出しアドレスの末尾になります。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "status": {},
                    "version": {},
                    "public": {},
                    "url": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "deploy_function",
        "x-oneend-max-body-bytes": 4194304,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "description": "関数のコード全体です（8MBまで）。filesがあるとentryのファイルとして保存されます。filesにentryがあれば省略します。"
                  },
                  "public": {
                    "type": "boolean",
                    "description": "省略すると今の値を保ちます。新しい関数は非公開です。"
                  },
                  "package_json": {
                    "type": "string",
                    "description": "package.json全体です（任意）。あるとインストール後に1つのファイルにバンドルします。"
                  },
                  "package_lock": {
                    "type": "string",
                    "description": "package-lock.jsonです（任意）。あるとnpm ciでそのバージョンを正確にインストールします。"
                  },
                  "dependencies": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "使うnpmパッケージとバージョンです。例: {\"zod\": \"^3.23.8\"}。package_jsonのdependenciesに統合されます。"
                  },
                  "files": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "sourceの隣に置くほかのファイルです。相対パスから内容への対応です（最大200個、合計8MB）。関数フォルダーの隣のフォルダーは\"../_shared/cors.ts\"のように書きます。"
                  },
                  "entry": {
                    "type": "string",
                    "description": "sourceを保存するファイル名です。既定はindex.tsです。"
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "set_function_limits",
        "summary": "関数の時間制限",
        "description": "再デプロイせずに、関数の 1 回の呼び出しにかけられる時間（timeout_seconds）と SQL 1 文にかけられる時間（sql_timeout_seconds）を秒で設定します。既定は 150 秒（Supabase のエッジ関数と同じ）と 8 秒で、このサーバーの最大は get_function の timeout_cap_seconds です。null で既定値に戻り、省略すると今の値のままです。次の呼び出しから適用されます。制限を超えた呼び出しは 504 で打ち切られます。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "関数名。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_function_limits",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "public": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_function",
        "summary": "関数の削除",
        "description": "関数を削除します。そのアドレスは404を返し、その関数を呼び出す予約ジョブは失敗します。元に戻せないので、ユーザーがはっきり求めたときだけ使い、confirm に関数名をそのまま入れてください。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "関数名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_function",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "関数名です。nameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/database": {
      "get": {
        "operationId": "get_database_connection",
        "summary": "データベース接続情報",
        "description": "このプロジェクトのPostgreSQLに直接接続するためのアドレスを表示します。direct（5432、session: マイグレーションツールやデータベースクライアント用）とpooler（6543、transaction: サーバーレス用）です。パスワードは保存していないため、[YOUR-PASSWORD]と表示されます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "available": {},
                    "host": {},
                    "database": {},
                    "user": {},
                    "password_set": {},
                    "direct": {},
                    "pooler": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "get_database_connection"
      }
    },
    "/projects/{ref}/database/password": {
      "post": {
        "operationId": "reset_database_password",
        "summary": "データベースの新しいパスワード",
        "description": "直接接続用の新しいパスワードを作成し、一度だけ返します。古いパスワードで接続しているものは、次の接続から拒否されます。いまそのパスワードで接続しているサーバー、ジョブ、ツールは再接続のときに切れるので、confirm にプロジェクト名（list_projectsのname）をそのまま入れてください。このユーザーは行レベルセキュリティを迂回するため、サーバーにだけ置いてください。keep_for_deploys: true のときはパスワードを封印して保管し、本番のサーバー・ミドルウェア・関数が実行時に DATABASE_URL・POSTGRES_URL・DIRECT_URL を受け取ります(ビルドには渡しません)。デプロイしたコードがシークレットキーと同じくすべての行を読めるようになるので、ユーザーが望むときだけオンにしてください。これなしで作り直すと受け渡しも止まります。ユーザーが求めたときだけ使ってください。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "reset_database_password",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "keep_for_deploys": {
                    "type": "boolean",
                    "description": "true: 本番デプロイに DATABASE_URL として渡します(封印して保管)。なし・false: 保管せず、受け渡しも止めます。"
                  },
                  "confirm": {
                    "type": "string",
                    "description": "プロジェクト名です。list_projectsのnameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/backups": {
      "get": {
        "operationId": "list_backups",
        "summary": "バックアップ",
        "description": "プロジェクトのバックアップ（毎晩プロジェクトのリージョンの現地時刻03:00〜05:00の自動、手動、復元の直前に作成されたもの）と復元の履歴を表示します。retention_daysは保存期間です。",
        "tags": [
          "backups"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "retention_days": {},
                    "point_in_time": {},
                    "backups": {},
                    "restores": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_backups"
      },
      "post": {
        "operationId": "create_backup",
        "summary": "今すぐバックアップ",
        "description": "テーブル、ユーザー、ファイルを今バックアップします。大きな変更（マイグレーション、大量の削除）の前に作成してください。7日間保存されます。",
        "tags": [
          "backups"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "status": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_backup"
      }
    },
    "/projects/{ref}/backups/{backup_id}/restore": {
      "post": {
        "operationId": "post_projects_ref_backups_backup_id_restore",
        "summary": "バックアップの復元",
        "description": "プロジェクトのテーブル、ユーザー、ファイルをバックアップを作成した時点に戻します。backup_idの代わりにat（ISO形式の時刻）を指定すると、その時点に秒単位で戻します（Pro以上、list_backupsのpoint_in_timeの範囲内）。この場合ファイルは、ファイルバケットを使うサーバーでだけその時点の行が指すもの（過去14日以内に削除したものも含みます）に戻し、それ以外では今のままにします。その時点以降の変更はすべて失われるため、ユーザーがはっきり求めたときだけ使ってください。復元の直前の状態を先にバックアップするので、undo_backup_idで再び戻せます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "backups"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "backup_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_backupsのidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "restore_backup"
      }
    },
    "/projects/{ref}/backups/restore-to-time": {
      "post": {
        "operationId": "post_projects_ref_backups_restore_to_time",
        "summary": "バックアップの復元",
        "description": "プロジェクトのテーブル、ユーザー、ファイルをバックアップを作成した時点に戻します。backup_idの代わりにat（ISO形式の時刻）を指定すると、その時点に秒単位で戻します（Pro以上、list_backupsのpoint_in_timeの範囲内）。この場合ファイルは、ファイルバケットを使うサーバーでだけその時点の行が指すもの（過去14日以内に削除したものも含みます）に戻し、それ以外では今のままにします。その時点以降の変更はすべて失われるため、ユーザーがはっきり求めたときだけ使ってください。復元の直前の状態を先にバックアップするので、undo_backup_idで再び戻せます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "backups"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "restore_backup",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "at": {
                    "type": "string",
                    "description": "例: 2026-10-01T14:59:00+09:00"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/webhooks": {
      "get": {
        "operationId": "list_db_webhooks",
        "summary": "データベースWebhook",
        "description": "テーブルの変更を知らせるWebhookと、最近の送信を表示します。attachedがfalseの場合は、テーブルが削除されてWebhookが止まったことを意味します。署名キー（signing_secret）は作成時（create_db_webhook）に一度だけ表示します。一覧にはsigning_secret_setと末尾4文字（signing_secret_last4）だけを載せます。",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "webhooks": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_db_webhooks"
      },
      "post": {
        "operationId": "create_db_webhook",
        "summary": "データベースWebhookの作成",
        "description": "テーブルに行が追加、変更、削除されたときにPOSTを送ります。コミットされた変更だけを、数秒以内に送ります。 kindがurlならtargetは公開されたhttpsアドレス（プライベートアドレスや内部アドレスは不可、リダイレクトは追いません）、functionならこのプロジェクトの関数名です。 本文: { type: \"INSERT\"|\"UPDATE\"|\"DELETE\", table, schema: \"public\", record, old_record, hook, delivery, occurred_at }。 ヘッダーx-blackwall-signature: t=<秒>,v1=<HMAC-SHA256(signing_secret, \"<t>.<body>\")の16進数> で検証してください。 signing_secretはこの応答にだけ含まれ、あとから読み直せないので、受信側にすぐ保存してください。 失敗した場合（2xx以外の応答、または10秒超過）は、10秒、1分、5分、30分後に再送し、5回目で諦めます。",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "webhook": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_db_webhook",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Webhookを見分けるための名前です。"
                  },
                  "table": {
                    "type": "string",
                    "description": "list_tablesのテーブル名です。"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "insert",
                        "update",
                        "delete"
                      ]
                    },
                    "description": "送る変更の種類です: insert、update、delete。"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "url",
                      "function"
                    ],
                    "description": "アドレスにPOSTするならurl、このプロジェクトの関数を呼び出すならfunctionです。"
                  },
                  "target": {
                    "type": "string",
                    "description": "httpsアドレス、または関数名です。"
                  }
                },
                "required": [
                  "name",
                  "table",
                  "events",
                  "kind",
                  "target"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/webhooks/{webhook}": {
      "patch": {
        "operationId": "set_db_webhook_enabled",
        "summary": "データベースWebhookのオン・オフ",
        "description": "Webhookをオフまたはオンにします。オフの間に起きた変更は送られません。webhookはidまたは名前です。",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Webhookのidまたは名前です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "enabled": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_db_webhook_enabled",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueでオン、falseでオフにします。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_db_webhook",
        "summary": "データベースWebhookの削除",
        "description": "Webhookと、その送信履歴、まだ送っていない変更を削除します。",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Webhookのidまたは名前です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_db_webhook"
      }
    },
    "/projects/{ref}/webhooks/{webhook}/deliveries": {
      "get": {
        "operationId": "list_db_webhook_deliveries",
        "summary": "データベースWebhookの送信履歴",
        "description": "Webhookの最近の送信を、応答ステータスと失敗の理由とともに新しい順に表示します。7日間保存されます。",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Webhookのidまたは名前です。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "表示する送信の数です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "deliveries": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_db_webhook_deliveries"
      }
    },
    "/projects/{ref}/jobs": {
      "get": {
        "operationId": "list_jobs",
        "summary": "予約ジョブ",
        "description": "予約ジョブ（cron）を、スケジュール、次回の実行、前回の結果とともに表示します。プロジェクトのSQLでcron.scheduleにより作ったジョブはsourceがsqlです。limitはプランのジョブ数の上限です。時刻はすべてUTCです。",
        "tags": [
          "jobs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "timezone": {},
                    "limit": {},
                    "used": {},
                    "jobs": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_jobs"
      }
    },
    "/projects/{ref}/jobs/{job}": {
      "put": {
        "operationId": "save_job",
        "summary": "予約ジョブの作成・変更",
        "description": "スケジュールに従って関数を呼び出すか、SQL文を1つ実行します。同じ名前のジョブがあれば変更します。 scheduleはUTCの5フィールドcron（分 時 日 月 曜日）です。韓国と日本はUTC+9なので、現地時間の0時は \"0 15 * * *\" です。 kindがfunctionならtargetはデプロイ済みの関数名（本文が{}のPOSTで呼び出します）、sqlならtargetはservice roleで実行するSQLです。 外部URLは呼び出せません。関数を作成するか、SQLでnet.http_postを使ってください。SQLはtimeout_seconds（既定120秒）以内に終わる必要があり、SQLが自分でstatement_timeoutを延ばすとその分待ちます。どちらでもプランの最大（Free 300秒、Pro・Enterprise 3600秒）までです。 SQLのcron.scheduleで作ったジョブもsource=sqlとして一覧に出ます。SQL（cron.alter_job、cron.unschedule）またはset_job_enabled・remove_jobで変更します。 プランごとにプロジェクトあたりのジョブ数の上限があります（list_jobsのlimit）。",
        "tags": [
          "jobs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "job",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ジョブ名です。既存の名前で保存すると、そのジョブを変更します。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "timezone": {},
                    "job": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "save_job",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedule": {
                    "type": "string",
                    "description": "例: \"*/5 * * * *\"（5分ごと）、\"0 15 * * *\"（韓国・日本時間の0時）。"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "function",
                      "sql"
                    ],
                    "description": "デプロイ済みの関数を呼び出すならfunction、SQLを実行するならsqlです。"
                  },
                  "target": {
                    "type": "string",
                    "description": "関数名、または実行するSQLです。"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "ジョブを実行するかどうかです。既定はオンです。"
                  },
                  "timeout_seconds": {
                    "type": "number",
                    "description": "SQLジョブが実行できる最大時間（秒）です。既定120、最大はプランごと（Free 300、Pro・Enterprise 3600）です。"
                  }
                },
                "required": [
                  "schedule",
                  "kind",
                  "target"
                ]
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "set_job_enabled",
        "summary": "予約ジョブのオン・オフ",
        "description": "予約ジョブをオフにする、またはオンに戻します。オンに戻しても、逃した実行を取り戻すことはなく、次の予定時刻から実行します。jobはidまたは名前です。",
        "tags": [
          "jobs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "job",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ジョブのidまたは名前です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "enabled": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_job_enabled",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueでオン、falseでオフにします。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_job",
        "summary": "予約ジョブの削除",
        "description": "予約ジョブとその実行履歴を削除します。",
        "tags": [
          "jobs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "job",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ジョブのidまたは名前です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_job"
      }
    },
    "/projects/{ref}/schemas": {
      "get": {
        "operationId": "list_schemas",
        "summary": "プロジェクトのスキーマ",
        "description": "public以外にプロジェクトがSQLで作ったスキーマ（create schema blackquant）と、それぞれをデータAPIが公開しているか（exposed）を表示します。データベース内の名前はapp_<ref>_名前ですが、SQLとクライアントでは作った名前をそのまま使います。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "always_exposed": {},
                    "schemas": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_schemas"
      }
    },
    "/projects/{ref}/schemas/exposed": {
      "put": {
        "operationId": "set_exposed_schemas",
        "summary": "公開スキーマの設定",
        "description": "データAPI（/rest/v1）がpublic以外に応答するスキーマの一覧を丸ごと設定します（SupabaseのExposed schemas）。公開したスキーマはAccept-Profile・Content-Profileヘッダー、supabase-jsのdb: { schema }または.schema()で使います。アクセスルール（RLS）とanon・authenticated・service_roleの権限はpublicと同じく適用されます。空の一覧ならpublicのみ公開します。30秒以内に反映されます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "exposed": {},
                    "schemas": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_exposed_schemas",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exposed": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "公開するスキーマ名（list_schemasのname）。publicは常に公開されます。"
                  }
                },
                "required": [
                  "exposed"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/data-api": {
      "get": {
        "operationId": "get_data_api_settings",
        "summary": "データAPIの設定を見る",
        "description": "データAPI（/rest/v1）がオンか、1回に返す最大行数（max_rows、nullなら上限なし）、公開スキーマ、検索パス（search_path）を見ます。search_path_choicesは検索パスに入れられるスキーマです：public、プロジェクトがcreate schemaで作ったスキーマ、extensions。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "enabled": {},
                    "max_rows": {},
                    "exposed_schemas": {},
                    "search_path": {},
                    "search_path_choices": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_data_api_settings"
      },
      "patch": {
        "operationId": "set_data_api_settings",
        "summary": "データAPIの設定を変える",
        "description": "データAPI（/rest/v1）をオンまたはオフにし、最大行数と検索パスを設定します。指定したものだけを変えます。検索パスに入れたスキーマは要求したスキーマの後ろに付き、関数やビューがスキーマ名なしでその中のテーブルと関数を見つけます。30秒以内に反映されます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_data_api_settings",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "falseにすると/rest/v1はすべて404で応答します。"
                  },
                  "max_rows": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 1000000,
                    "description": "1回に返す最大行数です。nullなら上限なしです。"
                  },
                  "search_path": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 20,
                    "description": "検索パスに入れるスキーマです（get_data_api_settingsのsearch_path_choicesのname）。空の一覧なら何も入れません。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/jobs/{job}/run": {
      "post": {
        "operationId": "run_job",
        "summary": "予約ジョブを今すぐ実行",
        "description": "スケジュールを待たずに、1分以内にジョブを1回実行します。結果はlist_job_runsで確認してください。",
        "tags": [
          "jobs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "job",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ジョブのidまたは名前です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "run_job"
      }
    },
    "/projects/{ref}/jobs/{job}/runs": {
      "get": {
        "operationId": "list_job_runs",
        "summary": "予約ジョブの実行履歴",
        "description": "ジョブの最近の実行と結果を新しい順に表示します。失敗した場合はエラーも含みます。",
        "tags": [
          "jobs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "job",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ジョブのidまたは名前です。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "表示する実行の数です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "runs": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_job_runs"
      }
    },
    "/projects/{ref}/env": {
      "get": {
        "operationId": "list_env_vars",
        "summary": "環境変数",
        "description": "デプロイしたアプリがビルドと実行時に受け取る環境変数です。同じ名前をプロダクションとプレビューで別々に持てます。機密の値は返さず、末尾4文字だけがvalue_hintとして返ります。readableがfalseの場合は値を開けずビルドからも除かれるため、もう一度保存してください。automaticは保存しなくても入る自動で入る変数です: SUPABASE_URL、NEXT_PUBLIC_SUPABASE_URL、SUPABASE_ANON_KEY、NEXT_PUBLIC_SUPABASE_ANON_KEY、NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY、SUPABASE_SERVICE_ROLE_KEY。Supabaseから移したアプリがすでに読んでいる名前です。available_inは入る場所です: 公開の値はビルドと実行時(build, runtime)、SUPABASE_SERVICE_ROLE_KEYは実行時のみ(runtime: サーバー・ミドルウェア・関数)で、ビルドには入りません。同じ名前で保存した変数が優先され、保存した値はビルドにも入ります(overridden_in)。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "automatic": {},
                    "variables": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "list_env_vars"
      },
      "post": {
        "operationId": "set_env_vars",
        "summary": "環境変数の保存",
        "description": "環境変数を1つ以上保存します。variablesで1つずつ指定するか、dotenvに.envファイルの内容を丸ごと渡せます。同じ名前があれば上書きします。1つでも不正なものがあれば、何も保存しません。ただし dotenv のうちプラットフォームが設定する名前の行は飛ばし、skipped で知らせます。PORT、HOST、HOSTNAME、HOME とBLACKWALL_で始まる名前はプラットフォームが使うため設定できません。ビルドにはCI=1が入りますが、CIを自分で設定すると（CI=falseなど）その値を使います。変更した値は次のデプロイからビルドに使われます。sensitiveを指定しないと、シークレットらしい名前（API_KEY、STRIPE_SECRET、DATABASE_URLなど）は機密の値として保存し、再び読めなくなります（sensitive_keys）。プロダクションの値はオーナーと管理者のみ変更できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_env_vars",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variables": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "description": "{ key, value } のリストです。"
                  },
                  "dotenv": {
                    "type": "string",
                    "description": ".envファイルの内容です。コメントと空行は読み飛ばします。"
                  },
                  "targets": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "production",
                        "preview",
                        "development"
                      ]
                    },
                    "minItems": 1,
                    "description": "previewは、プロダクションブランチ以外のすべてのブランチのデプロイを意味します。"
                  },
                  "sensitive": {
                    "type": "boolean",
                    "description": "trueなら保存後に値を再び読めなくなります。指定しないと、名前にSECRET、TOKEN、PASSWORD、PRIVATE、DSN、DATABASE_URL、KEY_を含むか_KEYで終わる変数だけを機密の値として保存します。falseならすべて読める状態のままです。"
                  },
                  "app": {
                    "type": "string",
                    "description": "そのアプリだけに保存するときのアプリ名（list_appsのname）です。同じ名前のプロジェクト変数より優先します。空の場合はプロジェクトのすべてのアプリです。"
                  },
                  "branch": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "そのgitブランチのプレビューだけに保存するときのブランチ名です。targetsはpreviewのみにしてください。appと一緒に使うと、そのアプリのそのブランチだけに入ります。空の場合はすべてのプレビューです。"
                  }
                },
                "required": [
                  "targets"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/env/{target}/{key}": {
      "delete": {
        "operationId": "remove_env_var",
        "summary": "環境変数の削除",
        "description": "プロダクションかプレビューのどちらか一方から環境変数を1つ削除します。機密の値だった場合は復元できません。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "preview",
                "development"
              ],
              "description": "productionまたはpreviewです。"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "変数名です。"
            }
          },
          {
            "name": "app",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "1つのアプリだけに保存した変数を削除するときのアプリ名です。空の場合はプロジェクトの変数です。"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "1つのブランチのプレビューだけに保存した変数を削除するときのブランチ名です（list_env_varsのbranch）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {},
                    "target": {},
                    "app": {},
                    "branch": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_env_var"
      }
    },
    "/projects/{ref}/auth/providers": {
      "get": {
        "operationId": "list_auth_providers",
        "summary": "ソーシャルログインの設定",
        "description": "このプロジェクトのサービスに、どのアカウントでログインできるかを表示します。プラットフォームが対応するプロバイダーをすべて返すため、まだ設定していないものはconfigured: falseと表示されます。独自に登録したプロバイダー（custom:<名前>）はその後にcustom項目（アドレス、scopes、応答フィールドの対応）と一緒に出ます。callback_urlは、プロバイダーのコンソールにそのまま貼り付けるアドレスです。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "anonymous_sign_in": {},
                    "providers": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_auth_providers"
      }
    },
    "/projects/{ref}/auth/providers/{provider}": {
      "put": {
        "operationId": "set_auth_provider",
        "summary": "ソーシャルログインをオンにする",
        "description": "プロバイダー1つのクライアントIDとシークレットを保存してオンにします。シークレットは封印され読み戻せず、確認できるのは末尾4文字だけです。先にプロバイダーのコンソールでアプリを作成し、list_auth_providersのcallback_urlをリダイレクト先アドレスとして登録してください。保存済みのプロバイダーのIDだけを変える場合は、client_secretを空文字列にしてください。Supabaseと同じように、providerをcustom:<名前>にすると、プラットフォームの一覧にないOAuth 2.0・OpenID Connectプロバイダーを独自に登録します（例: custom:kakao-xts）。そのときはissuer（OpenID Connectならこれだけでアドレスを埋めます）またはauthorize_url・token_url（・userinfo_url）が必要で、scopesとclaims（応答のどのフィールドがid・email・email_verified・name・avatar・phoneか、ドットでつないだパス）を指定できます。アプリからはsignInWithOAuth({ provider: \"custom:<名前>\" })で呼び出し、ログイン直後のセッションにprovider_tokenが一度だけ入ります。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(google|kakao|naver|apple|github|gitlab|microsoft|facebook|line|discord|x|bitbucket|figma|linkedin_oidc|notion|twitch|slack_oidc|spotify|zoom|azure|keycloak|workos|twitter|slack|custom:[a-z0-9][a-z0-9_-]{0,39})$",
              "description": "ログインプロバイダー: google, kakao, naver, apple, github, gitlab, microsoft, facebook, line, discord, x, bitbucket, figma, linkedin_oidc, notion, twitch, slack_oidc, spotify, zoom, azure, keycloak, workos, twitter, slack、または独自に登録する custom:<名前>（英小文字・数字・-・_、40文字まで）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {},
                    "enabled": {},
                    "callback_url": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_auth_provider",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string",
                    "description": "プロバイダーのコンソールで発行されたクライアントIDです。"
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "空文字列なら保存済みのシークレットを保ちます。新しいプロバイダーでは必須です。"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "既定はオンです。"
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "set_auth_provider_enabled",
        "summary": "ソーシャルログインのオン・オフ",
        "description": "プロバイダーをオフまたはオンにし、保存済みの認証情報は残します。プロバイダーの不具合の原因を調べている間に使ってください。オンに戻すときに新しいシークレットは不要です。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(google|kakao|naver|apple|github|gitlab|microsoft|facebook|line|discord|x|bitbucket|figma|linkedin_oidc|notion|twitch|slack_oidc|spotify|zoom|azure|keycloak|workos|twitter|slack|custom:[a-z0-9][a-z0-9_-]{0,39})$",
              "description": "ログインプロバイダー: google, kakao, naver, apple, github, gitlab, microsoft, facebook, line, discord, x, bitbucket, figma, linkedin_oidc, notion, twitch, slack_oidc, spotify, zoom, azure, keycloak, workos, twitter, slack、または独自に登録する custom:<名前>（英小文字・数字・-・_、40文字まで）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {},
                    "enabled": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_auth_provider_enabled",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueでオン、falseでオフにします。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_auth_provider",
        "summary": "ソーシャルログインの削除",
        "description": "プロバイダーの設定を認証情報ごと削除します。一時的にオフにするだけならset_auth_provider_enabledを使ってください。この方法で削除した後は、シークレットを再取得する必要があります。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(google|kakao|naver|apple|github|gitlab|microsoft|facebook|line|discord|x|bitbucket|figma|linkedin_oidc|notion|twitch|slack_oidc|spotify|zoom|azure|keycloak|workos|twitter|slack|custom:[a-z0-9][a-z0-9_-]{0,39})$",
              "description": "ログインプロバイダー: google, kakao, naver, apple, github, gitlab, microsoft, facebook, line, discord, x, bitbucket, figma, linkedin_oidc, notion, twitch, slack_oidc, spotify, zoom, azure, keycloak, workos, twitter, slack、または独自に登録する custom:<名前>（英小文字・数字・-・_、40文字まで）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_auth_provider"
      }
    },
    "/projects/{ref}/auth/redirect-urls": {
      "get": {
        "operationId": "list_redirect_urls",
        "summary": "ログイン後に戻るアドレス",
        "description": "ログイン後に戻すことができるアドレスです。ここにないアドレスには誰も送られません。ログインはできるのにどこにも戻らない場合は、まずここを見てください。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "urls": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_redirect_urls"
      },
      "post": {
        "operationId": "add_redirect_url",
        "summary": "戻るアドレスの追加",
        "description": "許可リストにアドレスを1つ追加します。スキーム、ホスト、ポートがすべて一致する必要があり、パスは確認しません。そのためhttps://app.example.com/callbackを追加するとhttps://app.example.comとして保存されます。モバイルアプリ独自のスキーム（co.example.app://callback）も追加できます（ドットを含むスキームのみ）。応答には実際に保存されたリストが含まれます。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "urls": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "add_redirect_url",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "アドレスです。例: https://app.example.com"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_redirect_url",
        "summary": "戻るアドレスの削除",
        "description": "許可リストからアドレスを1つ外します。list_redirect_urlsが返したとおりに指定してください。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "urls": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_redirect_url",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "list_redirect_urlsが返したとおりのアドレスです。"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/auth/sms": {
      "get": {
        "operationId": "get_sms_settings",
        "summary": "SMSログイン設定の確認",
        "description": "電話番号の認証コードログイン(signInWithOtp({ phone }))に使うSMSアカウントを確認します。プロバイダー(platform、solapi、nhn、aligo、twilio)、送信元番号、送信できる国番号、認証コードの桁数と有効時間、1時間あたりの上限です。認証情報は末尾4文字だけ表示されます。platform_availableがtrueのときだけ、プラットフォームのアカウント(1通 ₩100、韓国のみ)を選べます。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "configured": {},
                    "provider": {},
                    "enabled": {},
                    "sender": {},
                    "allowed_countries": {},
                    "otp_length": {},
                    "otp_ttl_seconds": {},
                    "hourly_limit": {},
                    "template": {},
                    "key_hint": {},
                    "secret_hint": {},
                    "account_hint": {},
                    "credentials_readable": {},
                    "platform_available": {},
                    "providers": {},
                    "updated_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_sms_settings"
      },
      "put": {
        "operationId": "set_sms_settings",
        "summary": "SMSログインの設定",
        "description": "SMSアカウントを保存してオンにします。自分で契約したプロバイダーには、key・secret・account(プロバイダーによって異なります。SolapiはAPI KeyとAPI Secret、NHN CloudはApp KeyとSecret Key、AligoはAPI KeyとUser ID(account)、TwilioとTwilio VerifyはAccount SID(account)とAuth Token(secret)、MessageBirdはAccess Key(key)、TextlocalはAPI Key(key)、VonageはAPI Key(key)とAPI Secret(secret))と、事前登録した送信元(MessageBird・Textlocal・Vonageは11文字以内の送信者IDも可、Twilio VerifyはVAで始まるVerify Service SID)が必要です。電話番号の確認やテスト番号などは update_auth_config の SMS_* キーで変更します。空欄の認証情報は保存済みの値を使います。allowed_countriesは既定で82(韓国)のみです。対象外の国を入れると、海外の有料番号にSMSを送らせる詐欺の対象になります。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_sms_settings",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "platform",
                      "solapi",
                      "nhn",
                      "aligo",
                      "twilio",
                      "messagebird",
                      "textlocal",
                      "vonage",
                      "twilio_verify"
                    ],
                    "description": "platform(プラットフォームのアカウント、有料プランのみ)、solapi、nhn、aligo、twilio、messagebird、textlocal、vonage、twilio_verifyのいずれか。"
                  },
                  "key": {
                    "type": "string",
                    "description": "SolapiのAPI Key、NHN CloudのApp Key、AligoのAPI Key。空欄なら保存済みの値。"
                  },
                  "secret": {
                    "type": "string",
                    "description": "SolapiのAPI Secret、NHN CloudのSecret Key、TwilioのAuth Token。空欄なら保存済みの値。"
                  },
                  "account": {
                    "type": "string",
                    "description": "AligoのUser ID、TwilioのAccount SID。空欄なら保存済みの値。"
                  },
                  "sender": {
                    "type": "string",
                    "description": "送信元番号。例: 01012345678。Twilioは+1の番号か、MGで始まるMessaging Service SID。"
                  },
                  "allowed_countries": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "送信できる国番号の一覧。例: [\"82\"]。"
                  },
                  "otp_length": {
                    "type": "integer",
                    "minimum": 6,
                    "maximum": 10,
                    "description": "認証コードの桁数、6から10。既定は6。"
                  },
                  "otp_ttl_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 3600,
                    "description": "認証コードの有効時間、60から3600秒。既定は300。"
                  },
                  "hourly_limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000,
                    "description": "プロジェクト全体で1時間に送れる上限。既定は200。"
                  },
                  "template": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "{{code}}を含む文面。nullなら既定の文面。"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "既定はオンです。"
                  }
                },
                "required": [
                  "provider"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_sms_settings",
        "summary": "SMSログインの削除",
        "description": "SMSアカウントの設定を認証情報ごと削除します。以降の電話番号ログインはphone_provider_disabledで拒否されます。一時的にオフにするだけなら、set_sms_settingsにenabled: falseを渡してください。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_sms_settings"
      }
    },
    "/projects/{ref}/auth/smtp": {
      "get": {
        "operationId": "get_smtp_settings",
        "summary": "SMTP設定の表示",
        "description": "このプロジェクトの認証メール（登録確認・パスワード再設定・ログインリンク・メールアドレス変更・招待）を送るSMTPサーバーと送信者を表示します。SupabaseのSMTP Settingsと同じ項目です。パスワードは表示されず、password_hintに末尾4文字だけが出ます（8文字以上の場合）。last_errorがあれば、そのサーバーが拒否したためプラットフォームの送信アドレスから代わりに送ったということです。configuredがfalseならプラットフォームの送信アドレスを使います。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "configured": {},
                    "enabled": {},
                    "sender_email": {},
                    "sender_name": {},
                    "host": {},
                    "port": {},
                    "username": {},
                    "password_hint": {},
                    "password_readable": {},
                    "minimum_interval_seconds": {},
                    "rate_limit_per_hour": {},
                    "last_sent_at": {},
                    "last_error": {},
                    "last_error_at": {},
                    "updated_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_smtp_settings"
      },
      "put": {
        "operationId": "set_smtp_settings",
        "summary": "SMTP設定",
        "description": "認証メールをこのプロジェクトのSMTPサーバーから、指定した送信者名とアドレスで送ります。初回はsender_email、host、username、passwordが必要で、その後は変える値だけで構いません（passwordを空にすると保存済みの値を使います）。サーバーはパブリックなアドレスで、TLS（465は最初から、それ以外はSTARTTLS）を使う必要があります。拒否された場合はプラットフォームの送信アドレスから送り、理由をlast_errorに残します。保存後にtest_smtp_settingsで確認してください。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_smtp_settings",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sender_email": {
                    "type": "string",
                    "description": "送信者メールアドレス（Sender email）です。例: no-reply@shop.example。"
                  },
                  "sender_name": {
                    "type": "string",
                    "description": "送信者名（Sender name）です。例: 私のお店。"
                  },
                  "host": {
                    "type": "string",
                    "description": "SMTPサーバーのアドレス（Host）です。例: smtp.sendgrid.net。"
                  },
                  "port": {
                    "type": "integer",
                    "enum": [
                      25,
                      465,
                      587,
                      2465,
                      2525
                    ],
                    "description": "ポート（Port）: 25、465、587、2465、2525のいずれかです。既定は587です。"
                  },
                  "username": {
                    "type": "string",
                    "description": "SMTPのユーザー名（Username）です。"
                  },
                  "password": {
                    "type": "string",
                    "description": "SMTPのパスワード（Password）です。空なら保存済みの値を使います。"
                  },
                  "minimum_interval_seconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3600,
                    "description": "同じアドレスに再び送るまでの最小間隔（秒）です。既定は60です。"
                  },
                  "rate_limit_per_hour": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000,
                    "description": "プロジェクト全体が1時間に送れるメールの数です。既定は100です。超えるとover_email_send_rate_limit（429）で拒否されます。"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "falseにすると設定は残したまま、プラットフォームの送信アドレスから送ります。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_smtp_settings",
        "summary": "SMTP設定の削除",
        "description": "SMTP設定をパスワードごと削除します。以降、認証メールはプラットフォームの送信アドレスから送られます。一時的に止めるにはset_smtp_settingsにenabled: falseを渡してください。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "removed": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_smtp_settings"
      }
    },
    "/projects/{ref}/auth/smtp/test": {
      "post": {
        "operationId": "test_smtp_settings",
        "summary": "SMTPテストメールの送信",
        "description": "保存したSMTPサーバーからテストメールを1通送ります。プラットフォームからの代替送信はしないので、失敗した場合はサーバーが返した理由がそのまま表示されます。toを省くと呼び出した人のアドレスに送ります。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "sent": {},
                    "to": {},
                    "sender_email": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "test_smtp_settings",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "description": "送信先のアドレスです。省くと自分のアドレスです。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/auth/templates": {
      "get": {
        "operationId": "get_projects_ref_auth_templates",
        "summary": "メールテンプレートの表示",
        "description": "認証メール6種類（confirmation、invite、magic_link、recovery、email_change、reauthentication）の件名と本文（HTML）です。customがfalseの種類は既定の文面（リクエストの言語に合わせた韓国語・英語・日本語）を使います。typeを渡すとその1つだけを表示します。使える変数はSupabaseと同じです: {{ .ConfirmationURL }}、{{ .Token }}、{{ .TokenHash }}、{{ .SiteURL }}、{{ .Email }}、{{ .NewEmail }}、{{ .RedirectTo }}、{{ .Data.<key> }}。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "variables": {},
                    "templates": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_email_templates"
      }
    },
    "/projects/{ref}/auth/templates/{type}": {
      "get": {
        "operationId": "get_projects_ref_auth_templates_type",
        "summary": "メールテンプレートの表示",
        "description": "認証メール6種類（confirmation、invite、magic_link、recovery、email_change、reauthentication）の件名と本文（HTML）です。customがfalseの種類は既定の文面（リクエストの言語に合わせた韓国語・英語・日本語）を使います。typeを渡すとその1つだけを表示します。使える変数はSupabaseと同じです: {{ .ConfirmationURL }}、{{ .Token }}、{{ .TokenHash }}、{{ .SiteURL }}、{{ .Email }}、{{ .NewEmail }}、{{ .RedirectTo }}、{{ .Data.<key> }}。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "confirmation",
                "invite",
                "magic_link",
                "recovery",
                "email_change",
                "reauthentication",
                "password_changed",
                "email_changed",
                "mfa_enrolled",
                "mfa_removed",
                "identity_linked",
                "identity_unlinked"
              ],
              "description": "confirmation、invite、magic_link、recovery、email_change、reauthenticationのいずれかです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "variables": {},
                    "templates": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_email_templates"
      },
      "put": {
        "operationId": "set_email_template",
        "summary": "メールテンプレートの保存",
        "description": "1つの種類の件名と本文（HTML）を設定します。Supabaseからコピーしたテンプレートをそのまま使えます。差し込む値はHTMLエスケープされ、件名は1行である必要があります。{{ if }}などの他の構文は拒否されます。reauthenticationは保存されますが、まだ送信されません（reauthenticateは未対応）。保存前にpreview_email_templateで確認してください。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "confirmation",
                "invite",
                "magic_link",
                "recovery",
                "email_change",
                "reauthentication",
                "password_changed",
                "email_changed",
                "mfa_enrolled",
                "mfa_removed",
                "identity_linked",
                "identity_unlinked"
              ],
              "description": "confirmation、invite、magic_link、recovery、email_change、reauthenticationのいずれかです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_email_template",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "件名です。200文字までです。"
                  },
                  "body": {
                    "type": "string",
                    "maxLength": 50000,
                    "description": "本文のHTMLです。例: <a href=\"{{ .ConfirmationURL }}\">登録を確認</a>"
                  }
                },
                "required": [
                  "subject",
                  "body"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_email_template",
        "summary": "メールテンプレートを戻す",
        "description": "1つの種類のテンプレートを削除し、既定の文面（韓国語・英語・日本語）に戻します。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "confirmation",
                "invite",
                "magic_link",
                "recovery",
                "email_change",
                "reauthentication",
                "password_changed",
                "email_changed",
                "mfa_enrolled",
                "mfa_removed",
                "identity_linked",
                "identity_unlinked"
              ],
              "description": "confirmation、invite、magic_link、recovery、email_change、reauthenticationのいずれかです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "type": {},
                    "removed": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_email_template"
      }
    },
    "/projects/{ref}/auth/templates/{type}/preview": {
      "post": {
        "operationId": "preview_email_template",
        "summary": "メールテンプレートのプレビュー",
        "description": "例の値を入れたときのメールの見た目（件名、HTML、テキスト）を返します。subjectとbodyを渡すと保存せずにその内容を、省くと保存済みのテンプレートか既定の文面を表示します。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "confirmation",
                "invite",
                "magic_link",
                "recovery",
                "email_change",
                "reauthentication",
                "password_changed",
                "email_changed",
                "mfa_enrolled",
                "mfa_removed",
                "identity_linked",
                "identity_unlinked"
              ],
              "description": "confirmation、invite、magic_link、recovery、email_change、reauthenticationのいずれかです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "type": {},
                    "custom": {},
                    "subject": {},
                    "html": {},
                    "text": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "preview_email_template",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "description": "保存せずに試す件名です。"
                  },
                  "body": {
                    "type": "string",
                    "description": "保存せずに試す本文です。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/auth/sso": {
      "get": {
        "operationId": "list_sso_providers",
        "summary": "SAML SSOの確認",
        "description": "このプロジェクトに登録したSAML IdPとメールドメイン、IdPに入力する2つのアドレス(acs_url、entity_id)を確認します。アプリではsupabase.auth.signInWithSSO({ domain })でログインします。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "acs_url": {},
                    "entity_id": {},
                    "metadata_url": {},
                    "new_providers_allowed": {},
                    "providers": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_sso_providers"
      }
    },
    "/projects/{ref}/{param0}/{param1}": {
      "post": {
        "operationId": "post_projects_ref_param0_param1",
        "summary": "SAML SSOの追加",
        "description": "IdPのメタデータ(httpsのURLかXML)からSAML IdPを登録します。メタデータにはHTTP-Redirectのログインアドレスと署名証明書が必要です。domainsのメールドメインでsignInWithSSOを呼ぶと、このIdPに進みます。1つのドメインは1つのIdPにだけ設定できます。新しいIdPはエンタープライズプランでのみ追加できます(list_sso_providersのnew_providers_allowed)。登録済みのIdPはプランに関係なくそのまま動作します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "param0",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "param1",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {},
                    "entity_id": {},
                    "metadata_url": {},
                    "domains": {},
                    "attribute_mapping": {},
                    "created_at": {},
                    "updated_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "add_sso_provider",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metadata_url": {
                    "type": "string",
                    "description": "httpsのURL。metadata_xmlとどちらか一方。"
                  },
                  "metadata_xml": {
                    "type": "string",
                    "description": "IdPのメタデータXML。metadata_urlとどちらか一方。"
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "メールドメイン。例: [\"example.com\"]。"
                  },
                  "attribute_mapping": {
                    "type": "object",
                    "description": "GoTrueの形式: {\"keys\": {\"email\": {\"name\": \"mail\"}}}。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/{param0}/{param1}/{param2}": {
      "put": {
        "operationId": "put_projects_ref_param0_param1_param2",
        "summary": "SAML SSOの追加",
        "description": "IdPのメタデータ(httpsのURLかXML)からSAML IdPを登録します。メタデータにはHTTP-Redirectのログインアドレスと署名証明書が必要です。domainsのメールドメインでsignInWithSSOを呼ぶと、このIdPに進みます。1つのドメインは1つのIdPにだけ設定できます。新しいIdPはエンタープライズプランでのみ追加できます(list_sso_providersのnew_providers_allowed)。登録済みのIdPはプランに関係なくそのまま動作します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "param0",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "param1",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "param2",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {},
                    "entity_id": {},
                    "metadata_url": {},
                    "domains": {},
                    "attribute_mapping": {},
                    "created_at": {},
                    "updated_at": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "add_sso_provider",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metadata_url": {
                    "type": "string",
                    "description": "httpsのURL。metadata_xmlとどちらか一方。"
                  },
                  "metadata_xml": {
                    "type": "string",
                    "description": "IdPのメタデータXML。metadata_urlとどちらか一方。"
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "メールドメイン。例: [\"example.com\"]。"
                  },
                  "attribute_mapping": {
                    "type": "object",
                    "description": "GoTrueの形式: {\"keys\": {\"email\": {\"name\": \"mail\"}}}。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/auth/sso/{id}": {
      "delete": {
        "operationId": "remove_sso_provider",
        "summary": "SAML SSOの削除",
        "description": "IdPを1つ削除します。そのIdPで作られたアカウントは残りますが、SSOではログインできなくなります。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_sso_providersのid。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_sso_provider"
      }
    },
    "/projects/{ref}/config/auth": {
      "get": {
        "operationId": "get_auth_config",
        "summary": "ログイン設定をすべて見る",
        "description": "このプロジェクトのログイン設定すべてを、Supabase の auth config と同じキー(小文字)で返します。登録(disable_signup、mailer_autoconfirm、security_manual_linking_enabled、external_anonymous_users_enabled)、メールプロバイダーとパスワードのルール、電話番号と SMS プロバイダー(sms_*)、SAML(saml_*)、Web3、ソーシャルプロバイダーごとの external_<プロバイダー>_enabled・client_id・secret・url・email_optional、カスタムプロバイダーのスイッチ。シークレットは ••••abcd のように末尾4文字だけを返し、この値を update_auth_config にそのまま返すと保存済みの値は変わりません。callback_url はプロバイダーのコンソールに貼り付けるアドレスです。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_auth_config"
      },
      "patch": {
        "operationId": "update_auth_config",
        "summary": "ログイン設定を変える",
        "description": "指定したキーだけを変えます(GoTrue の大文字の名前も使えます)。コンソールのサインイン / プロバイダー画面と同じルールで確認します: 有効にしたプロバイダーには必要な値がすべて要り(external_google_client_id、Keycloak のレルム url など)、Apple のシークレットは残り7日を超える ES256 の JWT、SMS の本文には {{ .Code }} が必要です。1つでも誤りがあれば何も保存せず、キーごとに理由を返します。カカオの同意項目は external_kakao_scopes(profile_nickname、account_email、gender などをカンマ区切り)、NAVER で保存する情報は external_naver_scopes、Google と GitHub の追加スコープは external_<プロバイダー>_additional_scopes です。シークレットに空文字列を渡すと削除します。オーナー・管理者・開発者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "update_auth_config",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/config/auth/custom-providers": {
      "get": {
        "operationId": "list_custom_providers",
        "summary": "カスタムログインプロバイダーを見る",
        "description": "プロジェクトが自分で定義した OAuth・OIDC プロバイダー(custom:<識別子>)と、プランの上限(max_providers)、スイッチ(enabled)を返します。アプリでは signInWithOAuth({ provider: \"custom:<識別子>\" }) で使います。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_custom_providers"
      },
      "post": {
        "operationId": "create_custom_provider",
        "summary": "カスタムログインプロバイダーを作る",
        "description": "OAuth・OIDC プロバイダー（custom:<識別子>）を1つ作って有効にします。set_auth_provider と同じ場所に保存します。provider_type が oidc なら issuer だけで、{issuer}/.well-known/openid-configuration からエンドポイントと jwks_uri を読み込み、id_token の署名・発行者・対象・有効期限・nonce をその鍵で確認します。oauth2 なら issuer か authorization_url・token_url が必要で、空欄のエンドポイントは {issuer}/oauth/authorize、/oauth/token、/oauth/userinfo になります。claim_map は応答のどのフィールドが id・email・email_verified・name・avatar・phone か（ドットでつないだパス）です。PKCE は既定でオンです。プランの上限を超えると拒否されます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "create_custom_provider",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pkce": {
                    "type": "boolean",
                    "description": "既定はオン。プロバイダーが PKCE を拒否する場合だけオフにします。"
                  },
                  "pkce_enabled": {
                    "type": "string"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "英小文字・数字・ハイフン。custom: は付けても付けなくてもかまいません。"
                  },
                  "name": {
                    "type": "string",
                    "description": "表示名。100文字未満。"
                  },
                  "label": {
                    "type": "string"
                  },
                  "provider_type": {
                    "type": "string",
                    "enum": [
                      "oidc",
                      "oauth2"
                    ],
                    "description": "oidc(エンドポイントを検出し id_token を検証)または oauth2(エンドポイントを指定し claim_map で読む)。"
                  },
                  "issuer": {
                    "type": "string",
                    "description": "プロバイダーのベース URL。"
                  },
                  "discovery_url": {
                    "type": "string",
                    "description": "oidc で検出ドキュメントが標準のパスにない場合。"
                  },
                  "authorization_url": {
                    "type": "string",
                    "description": "issuer のない oauth2 では必須。oidc では空欄なら検出します。"
                  },
                  "authorize_url": {
                    "type": "string"
                  },
                  "token_url": {
                    "type": "string",
                    "description": "issuer のない oauth2 では必須。oidc では空欄なら検出します。"
                  },
                  "userinfo_url": {
                    "type": "string",
                    "description": "ユーザー情報を読むアドレス。oidc では空欄なら検出します。"
                  },
                  "jwks_uri": {
                    "type": "string",
                    "description": "oidc で ID トークンの検証に使います。空欄なら検出します。"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "クライアント ID。"
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "クライアントシークレット。"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "例: [\"openid\", \"email\", \"profile\"]。"
                  },
                  "email_optional": {
                    "type": "boolean",
                    "description": "メールアドレスのないユーザーを許可。"
                  },
                  "claim_map": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      ]
                    },
                    "description": "応答のどのフィールドが id・email・email_verified・name・avatar・phone か、ドットでつないだパスで。省くと OpenID の標準名。"
                  },
                  "claims": {
                    "type": "string"
                  },
                  "token_auth": {
                    "type": "string",
                    "enum": [
                      "body",
                      "basic"
                    ],
                    "description": "client_secret を本文（body、既定）で送るか HTTP Basic（basic）で送るか。"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "既定はオン。"
                  }
                },
                "required": [
                  "identifier",
                  "name",
                  "provider_type",
                  "client_id",
                  "client_secret"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/config/auth/custom-providers/{identifier}": {
      "put": {
        "operationId": "update_custom_provider",
        "summary": "カスタムログインプロバイダーを変える",
        "description": "カスタムプロバイダーを1つ変更します。識別子は変えられません。client_secret を空文字列にすると保存済みのシークレットを使い続けます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_custom_providers の identifier。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "update_custom_provider",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pkce": {
                    "type": "boolean",
                    "description": "既定はオン。プロバイダーが PKCE を拒否する場合だけオフにします。"
                  },
                  "pkce_enabled": {
                    "type": "string"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "list_custom_providers の identifier。"
                  },
                  "name": {
                    "type": "string",
                    "description": "表示名。100文字未満。"
                  },
                  "label": {
                    "type": "string"
                  },
                  "provider_type": {
                    "type": "string",
                    "enum": [
                      "oidc",
                      "oauth2"
                    ],
                    "description": "oidc(エンドポイントを検出し id_token を検証)または oauth2(エンドポイントを指定し claim_map で読む)。"
                  },
                  "issuer": {
                    "type": "string",
                    "description": "プロバイダーのベース URL。"
                  },
                  "discovery_url": {
                    "type": "string",
                    "description": "oidc で検出ドキュメントが標準のパスにない場合。"
                  },
                  "authorization_url": {
                    "type": "string",
                    "description": "issuer のない oauth2 では必須。oidc では空欄なら検出します。"
                  },
                  "authorize_url": {
                    "type": "string"
                  },
                  "token_url": {
                    "type": "string",
                    "description": "issuer のない oauth2 では必須。oidc では空欄なら検出します。"
                  },
                  "userinfo_url": {
                    "type": "string",
                    "description": "ユーザー情報を読むアドレス。oidc では空欄なら検出します。"
                  },
                  "jwks_uri": {
                    "type": "string",
                    "description": "oidc で ID トークンの検証に使います。空欄なら検出します。"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "クライアント ID。"
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "空なら保存済みのシークレットを使い続けます。"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "例: [\"openid\", \"email\", \"profile\"]。"
                  },
                  "email_optional": {
                    "type": "boolean",
                    "description": "メールアドレスのないユーザーを許可。"
                  },
                  "claim_map": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      ]
                    },
                    "description": "応答のどのフィールドが id・email・email_verified・name・avatar・phone か、ドットでつないだパスで。省くと OpenID の標準名。"
                  },
                  "claims": {
                    "type": "string"
                  },
                  "token_auth": {
                    "type": "string",
                    "enum": [
                      "body",
                      "basic"
                    ],
                    "description": "client_secret を本文（body、既定）で送るか HTTP Basic（basic）で送るか。"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "保存と同時にオンまたはオフにします。"
                  }
                },
                "required": [
                  "identifier",
                  "name",
                  "provider_type",
                  "client_id"
                ]
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "set_custom_provider_enabled",
        "summary": "カスタムログインプロバイダーのオンとオフ",
        "description": "カスタムプロバイダーを1つオフまたはオンにします。オフにしても既存のセッションはそのままですが、新しいログインは再度オンにするまで失敗します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_custom_providers の identifier。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "set_custom_provider_enabled",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "true でオン、false でオフ。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_custom_provider",
        "summary": "カスタムログインプロバイダーを削除",
        "description": "カスタムプロバイダーを1つ削除します。元に戻せず、このプロバイダーでログインしていたユーザーは入れなくなります。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_custom_providers の identifier。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "remove_custom_provider"
      }
    },
    "/projects/{ref}/config/auth/copy-from-import": {
      "post": {
        "operationId": "copy_auth_from_import",
        "summary": "取り込み元からログイン設定をコピー",
        "description": "import_sources で接続した Supabase アカウントで、そのプロジェクトのログイン設定をこのサーバーのプロジェクト（ref）にコピーします。オンにしたソーシャルプロバイダー（Client ID、シークレットなど。update_auth_config と同じ確認）、戻り先アドレスの一覧（uri_allow_list。add_redirect_url と同じ）、空のときだけ site_url。シークレットは会話に出ません。答えはプロバイダーごとの copied と理由です。答えの callback_url を各プロバイダーのコンソールに登録するまで、ログインは失敗します。dry_run なら何も変えずに表示だけします。オーナー・管理者・開発者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "source_project": {},
                    "dry_run": {},
                    "callback_url": {},
                    "providers": {},
                    "site_url": {},
                    "redirect_urls": {},
                    "console_url": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "copy_auth_from_import",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "コピーするプロバイダー（google、kakao、apple、x など）。空なら Supabase でオンのものすべて。"
                  },
                  "dry_run": {
                    "type": "boolean",
                    "description": "true なら変更せず、何をコピーするかだけ表示します。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/config/auth/third-party-auth": {
      "get": {
        "operationId": "list_third_party_auth",
        "summary": "サードパーティ認証を見る",
        "description": "Data API が受け付ける他の認証サービス(Firebase、Clerk、WorkOS、Auth0、Amazon Cognito、OpenID 発行者)のトークンの一覧です。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_third_party_auth"
      },
      "post": {
        "operationId": "add_third_party_auth",
        "summary": "サードパーティ認証を追加",
        "description": "他の認証サービスの JWT をこのプロジェクトのログインとして受け付けます。value は type によって異なります: firebase はプロジェクト ID、clerk は https://clerk.<ドメイン> か https://<名前>.clerk.accounts.dev、workos は発行者 URL、auth0 はテナント名(<名前>.auth0.com の前半)、cognito はユーザープール ID(region も)、oidc は発行者 URL。Auth0 と Cognito では audiences の指定をおすすめします。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "add_third_party_auth",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "firebase",
                      "clerk",
                      "workos",
                      "auth0",
                      "cognito",
                      "oidc"
                    ],
                    "description": "firebase、clerk、workos、auth0、cognito、oidc のいずれか。"
                  },
                  "value": {
                    "type": "string",
                    "description": "type ごとに上のとおり。"
                  },
                  "region": {
                    "type": "string",
                    "description": "Cognito の AWS リージョン。例: ap-northeast-2"
                  },
                  "audiences": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "トークンの aud に含まれるべき値。"
                  },
                  "jwks_url": {
                    "type": "string",
                    "description": "oidc で、検出の代わりに使う JWKS のアドレス。"
                  }
                },
                "required": [
                  "type",
                  "value"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/config/auth/third-party-auth/{id}": {
      "delete": {
        "operationId": "remove_third_party_auth",
        "summary": "サードパーティ認証を削除",
        "description": "サードパーティ認証を1つ削除します。そのサービスでログインしたユーザーのリクエストは30秒以内に 401 で拒否されます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_third_party_auth の id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "remove_third_party_auth"
      }
    },
    "/projects/{ref}/auth/anonymous": {
      "put": {
        "operationId": "set_anonymous_sign_in",
        "summary": "匿名ログインのオン・オフ",
        "description": "メールアドレスなしですぐにセッションを発行する匿名ログインをオンまたはオフにします。今の状態はlist_auth_providersのanonymous_sign_inです。",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "anonymous_sign_in": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_anonymous_sign_in",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueでオン、falseでオフにします。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/git": {
      "get": {
        "operationId": "list_git_access",
        "summary": "Git 接続",
        "description": "コンソールの「Git 接続」と同じです。このプロジェクトがデプロイするリポジトリ（connected: プッシュでデプロイするか）、接続した GitHub アカウント（github_accounts）、非公開リポジトリの取得方法（GitHubまたはGitLabトークンの末尾4文字、GitHub Appのインストール）を表示します。非公開リポジトリのビルドが取得の段階で失敗する場合は、まずここを見てください。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "access": {},
                    "repositories": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_git_access"
      }
    },
    "/projects/{ref}/git/tokens/{provider}": {
      "put": {
        "operationId": "set_repo_token",
        "summary": "リポジトリトークンの保存",
        "description": "非公開リポジトリの取得に使うアクセストークンを保存します（読み取り権限で十分です）。封印され、二度と表示されません。セルフホストのGitLabなら、gitlab_baseにhttps://gitlab.example.comを指定してください。次のビルドから使われます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitlab",
                "bitbucket"
              ],
              "description": "githubまたはgitlabです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "provider": {},
                    "saved": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_repo_token",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "アクセストークンです。読み取り権限で十分です。"
                  },
                  "gitlab_base": {
                    "type": "string",
                    "description": "セルフホストのGitLabのアドレスです。gitlab.comなら空にします。"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_repo_token",
        "summary": "リポジトリトークンの削除",
        "description": "保存したトークンを削除します。接続済みのGitHub Appのインストールは残ります。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitlab",
                "bitbucket"
              ],
              "description": "githubまたはgitlabです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "provider": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "remove_repo_token"
      }
    },
    "/projects/{ref}/git/repos": {
      "post": {
        "operationId": "add_repository",
        "summary": "リポジトリの追加",
        "description": "最初のpushの前に、リポジトリをこのプロジェクトに紐付けます。以後GitHub Appを通じたpushはこのプロジェクトに届き、create_deploy_hookでpushなしにビルドできます。repoはGitHubならowner/name、GitLabならgroup/nameです。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "access": {},
                    "repositories": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "add_repository",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "github",
                      "gitlab",
                      "bitbucket"
                    ],
                    "description": "githubまたはgitlabです。"
                  },
                  "repo": {
                    "type": "string",
                    "description": "GitHubならowner/name、GitLabならgroup/nameです。"
                  },
                  "branch": {
                    "type": "string",
                    "description": "プロダクションブランチです。空ならmainです。"
                  }
                },
                "required": [
                  "provider",
                  "repo"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/git/github-app": {
      "delete": {
        "operationId": "delete_projects_ref_git_github_app",
        "summary": "GitHub アカウントの接続解除",
        "description": "このプロジェクトと GitHub アカウント（GitHub App のインストール）の接続を解除します。installation を指定するとそのアカウントだけ、空ならすべてです。保存したトークンと GitHub の App のインストールは残ります。接続には GitHub 上で人が承認する必要があるため、接続はコンソールでのみ行えます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "unlinked": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "unlink_github_app"
      }
    },
    "/projects/{ref}/git/github-app/{installation}": {
      "delete": {
        "operationId": "delete_projects_ref_git_github_app_installation",
        "summary": "GitHub アカウントの接続解除",
        "description": "このプロジェクトと GitHub アカウント（GitHub App のインストール）の接続を解除します。installation を指定するとそのアカウントだけ、空ならすべてです。保存したトークンと GitHub の App のインストールは残ります。接続には GitHub 上で人が承認する必要があるため、接続はコンソールでのみ行えます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "installation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "list_git_access の github_accounts[].installation_id です。空ならすべてです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "unlinked": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "unlink_github_app"
      }
    },
    "/projects/{ref}/git/importable": {
      "get": {
        "operationId": "list_importable_repositories",
        "summary": "インポートするリポジトリを探す",
        "description": "コンソールの Git 接続 → リポジトリのインポート一覧と同じです。接続した GitHub アカウントの GitHub App が見られるリポジトリを、最近プッシュした順に50個まで表示します。query を指定すると、300個を超えるインストールでもすべてから探します。GitHub でリポジトリを追加したばかりなら refresh: true。アカウントが複数あれば installation で選びます（list_git_access の github_accounts）。オーナーと管理者のみ見られます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "リポジトリ名の一部です。空なら最近プッシュした順です。"
            }
          },
          {
            "name": "installation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "どの GitHub アカウントのインストールかです。空なら既定のアカウントです。"
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "GitHub にもう一度問い合わせます（1分のキャッシュを飛ばします）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "github_account": {},
                    "installation_id": {},
                    "other_accounts": {},
                    "repositories": {},
                    "shown": {},
                    "matched": {},
                    "total": {},
                    "searched": {},
                    "add_repositories_url": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "list_importable_repositories"
      }
    },
    "/projects/{ref}/git/import": {
      "post": {
        "operationId": "import_repository",
        "summary": "リポジトリのインポート",
        "description": "コンソールの [接続してデプロイ] と同じです。GitHub App が見られるリポジトリをこのプロジェクトに接続し、プロダクションブランチの最新コミットで最初のデプロイをすぐ始めます。branch が空ならリポジトリの既定ブランチです。ビルド設定（framework など）と環境変数（dotenv に .env の内容）を最初のビルドの前に保存します。接続を解除したリポジトリをもう一度インポートすると、設定のまま接続し直します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "app": {},
                    "repo": {},
                    "branch": {},
                    "github_account": {},
                    "deployment": {},
                    "status": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "import_repository",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repo": {
                    "type": "string",
                    "description": "owner/name です。list_importable_repositories の repo です。"
                  },
                  "branch": {
                    "type": "string",
                    "description": "プロダクションブランチです。空ならリポジトリの既定ブランチです。"
                  },
                  "root_directory": {
                    "type": "string",
                    "description": "モノレポのアプリフォルダ（例: apps/web）です。空ならリポジトリの最上位です。接続済みのリポジトリで別のフォルダを指定すると新しいアプリとして追加します。"
                  },
                  "installation": {
                    "type": "integer",
                    "description": "どの GitHub アカウントのインストールで取得するかです。空ならリポジトリの持ち主のアカウントです。"
                  },
                  "dotenv": {
                    "type": "string",
                    "description": ".env ファイルの内容です。プロダクションとプレビューの両方に保存します。"
                  },
                  "sensitive": {
                    "type": "boolean",
                    "description": "dotenv の値を保存したあと二度と表示しません。"
                  },
                  "app": {
                    "type": "string",
                    "description": "アプリ名（コンソールの「アプリ名」）です。空ならフォルダ名、なければリポジトリ名です。同じ名前のアプリがあればその設定を変えます。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/git/checks/{repo}/{repo}": {
      "put": {
        "operationId": "set_checks_on_server",
        "summary": "チェックを One Server で実行",
        "description": "接続した GitHub リポジトリの GitHub Actions のチェックを One Server のマシンで実行するかを切り替えます。コンソールの Git 接続 → [チェックを One Server で実行] と同じです。オンにするとリポジトリ変数 POOL_RUNNER を保存し、ジョブが runs-on: ${{ vars.POOL_RUNNER || 'ubuntu-latest' }} を使うと One Server で動きます。オフにすると変数を削除し、GitHub のマシンに戻ります。state が needs_permission なら、permission_url で GitHub App の新しい権限を承認すると自動でオンになります。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_git_access の repositories[].repo（owner/name）です。"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_git_access の repositories[].repo（owner/name）です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_checks_on_server",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "true でオン、false でオフです。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/git/repos/{name}": {
      "delete": {
        "operationId": "disconnect_repository",
        "summary": "リポジトリの接続解除",
        "description": "コンソールの Git 接続 → リポジトリの [接続を解除] と同じです。このリポジトリにプッシュしてもデプロイしなくなります。公開中のデプロイ、履歴、ビルド設定、環境変数はそのままで、import_repository で同じリポジトリをインポートすると接続し直します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_git_access の repositories[].name です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "repo": {},
                    "connected": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "disconnect_repository"
      }
    },
    "/projects/{ref}/log-drains": {
      "get": {
        "operationId": "list_log_drains",
        "summary": "ログドレイン",
        "description": "ログの送信先（httpsまたはdatadog）、送るソース、最後の送信とエラーです。署名キー（signing_secret）は作成時（create_log_drain）に一度だけ表示します。一覧にはsigning_secret_setと、オーナーと管理者には末尾4文字（signing_secret_last4）だけを載せます。",
        "tags": [
          "logs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "sources": {},
                    "drains": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_log_drains"
      },
      "post": {
        "operationId": "create_log_drain",
        "summary": "ログドレインの追加",
        "description": "このプロジェクトのログを外部へ送ります。作成した後に書き込まれたログから送ります。kind=httpsは署名付きのJSONをPOSTし、kind=datadogはsecretにAPIキーが必要です。httpsドレインのsigning_secretはこの応答にだけ含まれるので、受信側にすぐ保存してください。プロジェクトごとに5個までです。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "logs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_log_drain",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "ドレインを見分けるための名前です。"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "https",
                      "datadog"
                    ],
                    "description": "httpsまたはdatadogです。"
                  },
                  "url": {
                    "type": "string",
                    "description": "公開されたhttpsアドレスです。"
                  },
                  "secret": {
                    "type": "string",
                    "description": "DatadogのAPIキー、またはhttpsで送るときにAuthorizationヘッダーに入れる値です。"
                  },
                  "sources": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "site",
                        "server",
                        "api",
                        "auth",
                        "functions",
                        "build"
                      ]
                    },
                    "description": "空ならすべてです。"
                  }
                },
                "required": [
                  "name",
                  "kind",
                  "url"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/log-drains/{id}": {
      "patch": {
        "operationId": "set_log_drain_enabled",
        "summary": "ログドレインのオン・オフ",
        "description": "設定を残したまま、送信を止めるか再開します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "logs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_log_drainsのidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "enabled": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_log_drain_enabled",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueで送信、falseで停止します。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_log_drain",
        "summary": "ログドレインの削除",
        "description": "ログドレインを削除します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "logs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_log_drainsのidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "remove_log_drain"
      }
    },
    "/projects/{ref}/analytics": {
      "get": {
        "operationId": "get_analytics",
        "summary": "ウェブ分析",
        "description": "日ごとのページビューと訪問者を、よく見られたページ、参照元、国、デバイス、ブラウザ、OSとあわせて返します。個人を識別できる値は保存しないため、合計だけです。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                1,
                7,
                30,
                90
              ],
              "description": "期間 (日)。既定は7です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "settings": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_analytics"
      }
    },
    "/projects/{ref}/analytics/breakdown": {
      "get": {
        "operationId": "get_analytics_breakdown",
        "summary": "Web Analytics の内訳",
        "description": "キャンペーン（utm_source・utm_medium・utm_campaign）、ルート、カスタムイベント、除外したボットの数を返します。event を指定すると、そのイベントのプロパティごとの値も返します。合計のみです。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                1,
                7,
                30,
                90
              ],
              "description": "期間。既定は 7。"
            }
          },
          {
            "name": "event",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "プロパティを見るイベントの名前。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "days": {},
                    "utm_source": {},
                    "utm_medium": {},
                    "utm_campaign": {},
                    "routes": {},
                    "events": {},
                    "bots_filtered": {},
                    "crawlers": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_analytics_breakdown"
      }
    },
    "/projects/{ref}/analytics/previews": {
      "put": {
        "operationId": "set_analytics_previews",
        "summary": "プレビューの訪問を数える",
        "description": "プレビューデプロイと dpl- アドレスの訪問を Web Analytics で数えるかを設定します。オフ（既定）ではプレビューにスクリプトを入れず、送られたものも捨てます。オーナーと管理者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "include_previews": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_analytics_previews",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "include_previews": {
                    "type": "boolean",
                    "description": "プレビューも数える。"
                  }
                },
                "required": [
                  "include_previews"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/analytics/export": {
      "get": {
        "operationId": "export_analytics",
        "summary": "Web Analytics をエクスポート",
        "description": "期間の合計を日付・項目・値ごとの CSV 文字列で返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                1,
                7,
                30,
                90
              ],
              "description": "期間。既定は 7。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "days": {},
                    "format": {},
                    "csv": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "export_analytics"
      }
    },
    "/projects/{ref}/analytics/reports": {
      "get": {
        "operationId": "list_analytics_reports",
        "summary": "カスタムレポート一覧",
        "description": "保存した Web Analytics のレポートと、レポートに入れられるグラフの名前を返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "widgets": {},
                    "reports": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_analytics_reports"
      },
      "post": {
        "operationId": "post_projects_ref_analytics_reports",
        "summary": "カスタムレポートを保存",
        "description": "レポートを作成するか、id で指定したレポートを変更します。開発者以上が実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "report": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "save_analytics_report",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "名前。"
                  },
                  "days": {
                    "type": "integer",
                    "enum": [
                      1,
                      7,
                      30,
                      90
                    ],
                    "description": "期間。既定は 7。"
                  },
                  "widgets": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "views",
                        "visitors",
                        "path",
                        "referrer",
                        "country",
                        "device",
                        "browser",
                        "os",
                        "utm_source",
                        "utm_medium",
                        "utm_campaign",
                        "route",
                        "event",
                        "bot",
                        "vitals"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 16,
                    "description": "表示するグラフと表。"
                  }
                },
                "required": [
                  "name",
                  "widgets"
                ]
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_projects_ref_analytics_reports",
        "summary": "カスタムレポートを保存",
        "description": "レポートを作成するか、id で指定したレポートを変更します。開発者以上が実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "report": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "save_analytics_report",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "名前。"
                  },
                  "days": {
                    "type": "integer",
                    "enum": [
                      1,
                      7,
                      30,
                      90
                    ],
                    "description": "期間。既定は 7。"
                  },
                  "widgets": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "views",
                        "visitors",
                        "path",
                        "referrer",
                        "country",
                        "device",
                        "browser",
                        "os",
                        "utm_source",
                        "utm_medium",
                        "utm_campaign",
                        "route",
                        "event",
                        "bot",
                        "vitals"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 16,
                    "description": "表示するグラフと表。"
                  }
                },
                "required": [
                  "name",
                  "widgets"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/analytics/reports/{id}": {
      "get": {
        "operationId": "get_analytics_report",
        "summary": "カスタムレポートを表示",
        "description": "保存したレポート 1 つを、その期間の合計、内訳、速度とあわせて返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_analytics_reports が返した id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "report": {},
                    "totals": {},
                    "breakdown": {},
                    "speed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_analytics_report"
      },
      "delete": {
        "operationId": "remove_analytics_report",
        "summary": "カスタムレポートを削除",
        "description": "レポートだけを削除します。分析の記録はそのままです。開発者以上が実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_analytics_reports が返した id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "remove_analytics_report"
      }
    },
    "/projects/{ref}/speed-insights": {
      "get": {
        "operationId": "get_speed_insights",
        "summary": "速度インサイト",
        "description": "実際の訪問者のブラウザが測った Core Web Vitals (LCP、INP、CLS、FCP、TTFB) の75パーセンタイルと評価、遅いページを返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                1,
                7,
                30,
                90
              ],
              "description": "期間 (日)。既定は7です。"
            }
          },
          {
            "name": "device",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "desktop",
                "mobile"
              ],
              "description": "デバイス。既定は all です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "settings": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_speed_insights"
      }
    },
    "/projects/{ref}/insights": {
      "put": {
        "operationId": "set_insights",
        "summary": "分析のオン・オフ",
        "description": "ウェブ分析と速度インサイトをオン・オフします。オンにするとサイトの HTML に /_oneend/insights/script.js が入ります。Vercel の @vercel/analytics・@vercel/speed-insights を使うアプリは、コードを変えずに同じ場所で集計されます。Cookie を使わず、IP アドレスも保存しません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "settings": {},
                    "script": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_insights",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "analytics": {
                    "type": "boolean",
                    "description": "ウェブ分析。"
                  },
                  "speed_insights": {
                    "type": "boolean",
                    "description": "速度インサイト。"
                  },
                  "vitals_sample_percent": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "速度を測る訪問の割合。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/remote-cache": {
      "get": {
        "operationId": "get_remote_cache",
        "summary": "リモートキャッシュ",
        "description": "Turborepo リモートキャッシュのアドレス、保存された結果の数と容量、直近 30 日のヒットとアップロード、今月計量された保存容量（remote_cache_gb_hour）と単価を返します。ダウンロードしたデータは egress_gb として数えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "api": {},
                    "artifacts": {},
                    "bytes": {},
                    "last_30_days": {},
                    "metered": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_remote_cache"
      }
    },
    "/projects/{ref}/remote-cache/artifacts": {
      "delete": {
        "operationId": "clear_remote_cache",
        "summary": "リモートキャッシュを空にする",
        "description": "保存された結果をすべて削除します。次のビルドから再び溜まり、削除した分だけ保存容量の計量が減ります。開発者以上が実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "cleared": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "clear_remote_cache"
      }
    },
    "/projects/{ref}/flags": {
      "get": {
        "operationId": "list_flags",
        "summary": "機能フラグ一覧",
        "description": "プロジェクトの機能フラグと、エッジ設定に置いたフラグの形の値をあわせて返します。source はどこにあるか、shadows は同じキーのエッジ設定の値を隠しているかを示します。同じキーならフラグが決めます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "flags": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_flags"
      }
    },
    "/projects/{ref}/flags/evaluate": {
      "get": {
        "operationId": "evaluate_flag",
        "summary": "機能フラグを評価",
        "description": "アプリが受け取る値を返します。コンテキスト（例: {\"user\": {\"id\": \"u1\"}}）と環境を指定するとフラグのルールで、そのキーのフラグがなければエッジ設定の値で決まります。source がどちらで決まったかを示します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 256,
              "description": "フラグのキー。"
            }
          },
          {
            "name": "environment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "環境。既定は production。"
            }
          },
          {
            "name": "context",
            "in": "query",
            "required": false,
            "schema": {
              "type": "object",
              "description": "評価するコンテキスト（JSON オブジェクト）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "key": {},
                    "environment": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "evaluate_flag"
      }
    },
    "/projects/{ref}/flags/{key}/environments/{environment}": {
      "put": {
        "operationId": "set_flag_enabled",
        "summary": "機能フラグのオン・オフ",
        "description": "1 つの環境でフラグをオン・オフします。本番はオーナーと管理者、その他の環境は開発者以上が実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "フラグのキー。"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "環境。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "key": {},
                    "environment": {},
                    "enabled": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-mcp-tool": "set_flag_enabled",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "オン。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/edge-config": {
      "get": {
        "operationId": "get_edge_config",
        "summary": "エッジ設定を読む",
        "description": "プロジェクトのエッジ設定 (デプロイせずに変える値と機能フラグ) 全体を、バージョン、サイズ、上限とあわせて返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "version": {},
                    "bytes": {},
                    "limits": {},
                    "items": {},
                    "read_url": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_edge_config"
      },
      "patch": {
        "operationId": "set_edge_config",
        "summary": "エッジ設定を変える",
        "description": "キーを保存または削除します。数秒以内にすべてのサーバーに反映され、変更履歴が残ります。フラグは true/false、または {\"enabled\": true, \"percent\": 20}、{\"enabled\": true, \"allow\": [\"user-1\"]} の形です。開発者以上が行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_edge_config",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "set": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "保存するキーと値 (値は JSON)。"
                  },
                  "delete": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "削除するキー。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/edge-config/tokens": {
      "get": {
        "operationId": "list_edge_config_tokens",
        "summary": "エッジ設定の読み取りトークン",
        "description": "このプロジェクトのエッジ設定を別のプロジェクトが読む読み取りトークンと、連携したプロジェクト（変数名、環境）、このプロジェクトに連携した別のプロジェクトのエッジ設定を返します。トークン自体は返しません。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "tokens": {},
                    "connected_here": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_edge_config_tokens"
      },
      "post": {
        "operationId": "create_edge_config_token",
        "summary": "エッジ設定の読み取りトークンを作成",
        "description": "読み取りトークンを作成し、connect を渡すと同じ組織のプロジェクトに連携します。連携したプロジェクトのデプロイには、次のデプロイから接続文字列（https://<ref>.<zone>/config/v1?token=…）が変数として入ります。トークンは今回だけ表示されます。プロジェクト管理者だけが実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "name": {},
                    "token": {},
                    "connection_string": {},
                    "connected": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_edge_config_token",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connect": {
                    "type": "object",
                    "properties": {
                      "ref": {
                        "type": "string",
                        "pattern": "^[a-z]{20}$"
                      },
                      "variable": {
                        "type": "string",
                        "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
                      },
                      "targets": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "production",
                            "preview",
                            "development"
                          ]
                        },
                        "minItems": 1,
                        "uniqueItems": true
                      }
                    },
                    "required": [
                      "ref"
                    ],
                    "additionalProperties": false,
                    "description": "すぐに連携する同じ組織のプロジェクト: ref、変数名 variable（既定は GLOBAL_CONFIG）、環境 targets（既定は 3 つすべて。本番はそのプロジェクトのオーナー・管理者だけ）。"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "トークンの名前。"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/edge-config/tokens/{id}": {
      "delete": {
        "operationId": "revoke_edge_config_token",
        "summary": "読み取りトークンを失効",
        "description": "読み取りトークンを失効させます。すぐに読めなくなり、連携したプロジェクトでは次のデプロイから変数がなくなります。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "読み取りトークンの id。list_edge_config_tokens で確認します。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "revoked": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "revoke_edge_config_token"
      }
    },
    "/projects/{ref}/edge-config/tokens/{id}/connections/{ref}": {
      "put": {
        "operationId": "connect_edge_config_token",
        "summary": "読み取りトークンをプロジェクトに連携",
        "description": "読み取りトークンを、同じ組織の別のプロジェクトのデプロイに変数として連携します。すでに連携していれば変数名と環境を変えます。そのプロジェクトの開発者以上（本番はオーナー・管理者）が必要です。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "読み取りトークンの id。list_edge_config_tokens で確認します。"
            }
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "connected": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "connect_edge_config_token",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variable": {
                    "type": "string",
                    "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                    "description": "デプロイで読む変数名。既定は GLOBAL_CONFIG。"
                  },
                  "targets": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "production",
                        "preview",
                        "development"
                      ]
                    },
                    "minItems": 1,
                    "uniqueItems": true,
                    "description": "変数が入る環境。既定は 3 つすべて。本番はそのプロジェクトのオーナー・管理者だけ。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "disconnect_edge_config_token",
        "summary": "読み取りトークンの連携を解除",
        "description": "読み取りトークンを 1 つのプロジェクトから外します。そのプロジェクトの次のデプロイから変数がなくなります。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "読み取りトークンの id。list_edge_config_tokens で確認します。"
            }
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "連携する同じ組織のプロジェクト。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "disconnected": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "disconnect_edge_config_token"
      }
    },
    "/projects/{ref}/edge-config/history": {
      "get": {
        "operationId": "get_edge_config_history",
        "summary": "エッジ設定の変更履歴",
        "description": "誰がいつどのキーを何から何に変えたかを、新しい順に返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "description": "件数。既定は50です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "changes": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_edge_config_history"
      }
    },
    "/projects/{ref}/rolling-releases": {
      "get": {
        "operationId": "get_rolling_releases",
        "summary": "段階的リリースの状態",
        "description": "段階的リリースの設定と、進行中のリリース (新しいデプロイが受け取る訪問者の割合)、最近の履歴を返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "config": {},
                    "active": {},
                    "recent": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_rolling_releases"
      },
      "put": {
        "operationId": "set_rolling_releases",
        "summary": "段階的リリースの設定",
        "description": "新しい本番デプロイを段階的な割合で出すかを決めます。stages は大きくなる割合のリスト (例: [10, 50])、stage_minutes は段階の長さで、auto_advance が false なら段階ごとに承認が必要です。abort_error_rate (0.05 = 5%) を超えると自動で戻します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "config": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_rolling_releases",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "オン。"
                  },
                  "stages": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "description": "段階ごとの割合 (%)。"
                  },
                  "stage_minutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1440,
                    "description": "段階の長さ (分)。"
                  },
                  "auto_advance": {
                    "type": "boolean",
                    "description": "時間が経ったら自動で進む。"
                  },
                  "abort_error_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0.001,
                    "maximum": 1,
                    "description": "自動で中止する5xx率。null ならオフ。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/rolling-releases/{action}": {
      "post": {
        "operationId": "advance_rolling_release",
        "summary": "段階的リリースを次の段階へ",
        "description": "進行中のリリースを次の段階の割合に上げます。最後の段階なら全員にリリースします。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "action",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "release": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "advance_rolling_release",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/kv": {
      "get": {
        "operationId": "list_kv_keys",
        "summary": "KV キーの一覧",
        "description": "KV ストアのキーを接頭辞で50個ずつ返します。使用量、上限、REST のアドレスもあわせて返します。シークレットを見られるロールのみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "接頭辞。"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "前の応答の cursor。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "usage": {},
                    "keys": {},
                    "cursor": {},
                    "rest_url": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "list_kv_keys"
      }
    },
    "/projects/{ref}/kv/{id}": {
      "get": {
        "operationId": "get_kv",
        "summary": "KV の値を読む",
        "description": "キー1つの値と残り秒数 (ttl、-1 は期限なし) を返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "key": {},
                    "value": {},
                    "ttl": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "get_kv"
      },
      "put": {
        "operationId": "set_kv",
        "summary": "KV の値を保存",
        "description": "キーに JSON の値を保存します。ttl は有効期限までの秒数です。開発者以上が行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "key": {},
                    "saved": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_kv",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "description": "値 (JSON)。"
                  },
                  "ttl": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "有効期限までの秒数。"
                  }
                },
                "required": [
                  "value"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_kv",
        "summary": "KV キーを削除",
        "description": "キーを削除します。開発者以上が行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "key": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "delete_kv"
      }
    },
    "/projects/{ref}/ai-gateway": {
      "get": {
        "operationId": "get_ai_gateway",
        "summary": "AI ゲートウェイ",
        "description": "AI ゲートウェイの OpenAI 互換アドレス、設定、プロバイダー (キーは末尾4文字のみ)、直近30日の使用量を返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "base_url": {},
                    "settings": {},
                    "providers": {},
                    "usage_30d": {},
                    "top_users_30d": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_ai_gateway"
      },
      "put": {
        "operationId": "set_ai_gateway",
        "summary": "AI ゲートウェイの設定",
        "description": "AI ゲートウェイのオン・オフ、ログインしたユーザーの許可、キャッシュ (秒)、1分あたりの上限、プラットフォームのプロバイダーへのフォールバック (トークン課金)、アプリのユーザー1人あたりの1日のリクエスト・トークン上限を決めます。ユーザーはログインしたユーザーの id、または secret キーで呼ぶときの x-oneend-user ヘッダーか本文の user です。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "settings": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_ai_gateway",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "オン。"
                  },
                  "allow_users": {
                    "type": "boolean",
                    "description": "ログインしたユーザーを許可。"
                  },
                  "cache_seconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 86400,
                    "description": "キャッシュの秒数。"
                  },
                  "rate_per_minute": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "1分あたりのリクエスト上限。"
                  },
                  "platform_fallback": {
                    "type": "boolean",
                    "description": "プラットフォームのプロバイダーへのフォールバック。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/ai-gateway/logs": {
      "get": {
        "operationId": "get_ai_gateway_logs",
        "summary": "AI ゲートウェイの呼び出し履歴",
        "description": "最近の呼び出しのプロバイダー、モデル、状態、トークン、レイテンシ、フォールバックの有無を返します。会話の内容は保存しません。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "description": "件数。既定は50です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "logs": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_ai_gateway_logs"
      }
    },
    "/projects/{ref}/ai-gateway/providers": {
      "post": {
        "operationId": "add_ai_provider",
        "summary": "AI プロバイダーを追加",
        "description": "プロバイダーをキーとあわせて追加します。OpenAI 互換、Anthropic（Messages API と相互に変換）、Google Gemini を選べます。アドレスは公開された https のみです。キーは封印して保存し、二度と表示しません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "add_ai_provider",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,39}$",
                    "description": "名前。名前/モデルで呼ぶとこのプロバイダーだけを呼びます。"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "google",
                      "deepseek",
                      "openai-compatible"
                    ],
                    "description": "種類。"
                  },
                  "base_url": {
                    "type": "string",
                    "description": "アドレス。openai、anthropic、google、deepseek は省略できます。"
                  },
                  "key": {
                    "type": "string",
                    "description": "API キー。"
                  },
                  "models": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "受け付けるモデル。空ならすべて。"
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000,
                    "description": "優先順位。小さい順。"
                  }
                },
                "required": [
                  "name",
                  "kind"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/ai-gateway/providers/{id}": {
      "patch": {
        "operationId": "set_ai_provider_enabled",
        "summary": "AI プロバイダーのオン・オフ",
        "description": "設定とキーは残したまま、プロバイダーの使用を止めたり再開したりします。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "get_ai_gateway が返した id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "enabled": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_ai_provider_enabled",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "使う。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_ai_provider",
        "summary": "AI プロバイダーを削除",
        "description": "プロバイダーと封印されたキーを削除します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "get_ai_gateway が返した id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "remove_ai_provider"
      }
    },
    "/projects/{ref}/ai-gateway/budgets": {
      "put": {
        "operationId": "set_ai_budgets",
        "summary": "AI ゲートウェイの予算",
        "description": "プロジェクトの AI ゲートウェイの予算をドルで設定します（日・週・月、UTC）。使い切ると次の期間まで呼び出しを拒否します。指定しない値はそのままです。オーナーと管理者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "budgets": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_ai_budgets",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "daily_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 日（UTC）の予算（ドル）。null で上限なし。"
                  },
                  "weekly_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 週間（月曜始まり、UTC）の予算（ドル）。null で上限なし。"
                  },
                  "monthly_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 か月（UTC）の予算（ドル）。null で上限なし。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/ai-gateway/keys": {
      "get": {
        "operationId": "list_ai_gateway_keys",
        "summary": "AI ゲートウェイキー一覧",
        "description": "ゲートウェイキーの名前、先頭部分、予算、今月の支出、最終使用時刻を返します。キーそのものは返しません。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "keys": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_ai_gateway_keys"
      },
      "post": {
        "operationId": "create_ai_gateway_key",
        "summary": "AI ゲートウェイキーを作成",
        "description": "アプリ 1 つ、またはプロジェクトが AI を再販する顧客 1 人に渡すゲートウェイキー（bwai_…）を、予算・タグ・1 分あたりの上限付きで作成します。キーはこの応答で一度だけ表示されます。タグ（external_ref）付きのキーはプロジェクトごとの 50 個の上限に数えません。オーナーと管理者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "name": {},
                    "key": {},
                    "base_url": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_ai_gateway_key",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "キーの名前。"
                  },
                  "daily_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 日（UTC）の予算（ドル）。null で上限なし。"
                  },
                  "weekly_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 週間（月曜始まり、UTC）の予算（ドル）。null で上限なし。"
                  },
                  "monthly_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 か月（UTC）の予算（ドル）。null で上限なし。"
                  },
                  "external_ref": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 200,
                    "description": "このキーがプロジェクトの台帳で誰か（例: 顧客のユーザー ID）。フックに一緒に送ります。"
                  },
                  "labels": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "description": "自由なラベル 20 個まで。例: {\"tier\": \"1\"}。フックに一緒に送ります。"
                  },
                  "rate_per_minute": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 100000,
                    "description": "1 分あたりのリクエスト数の上限。null で上限なし。"
                  },
                  "tokens_per_minute": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 100000000,
                    "description": "1 分あたりのトークン数（入力と出力）の上限。null で上限なし。"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/ai-gateway/keys/{id}/limits": {
      "put": {
        "operationId": "set_ai_gateway_key_limits",
        "summary": "AI ゲートウェイキーの上限",
        "description": "ゲートウェイキー 1 つの 1 分あたりのリクエスト数とトークン数の上限を変更します。すべてのサーバーが同じ数を数えます。指定しない値はそのまま、null で上限をなくします。オーナーと管理者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_ai_gateway_keys が返した id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "limits": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_ai_gateway_key_limits",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rate_per_minute": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 100000,
                    "description": "1 分あたりのリクエスト数の上限。null で上限なし。"
                  },
                  "tokens_per_minute": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 100000000,
                    "description": "1 分あたりのトークン数（入力と出力）の上限。null で上限なし。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/ai-gateway/aliases": {
      "put": {
        "operationId": "set_ai_model_aliases",
        "summary": "AI モデルの別名",
        "description": "呼び出す側が使うモデル名（別名）と、実際に送るモデルを設定します。別名ごとに先頭に入れるシステム指示を置けます。応答の model は別名で返ります。送った一覧が今の一覧をまるごと置き換えます。aliases_only を有効にすると別名以外は呼び出せず、/models も別名だけを返します。オーナーと管理者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "aliases_only": {},
                    "aliases": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_ai_model_aliases",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aliases": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "properties": {
                        "alias": {
                          "type": "string",
                          "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
                        },
                        "target": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "system_prompt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 20000
                        }
                      },
                      "required": [
                        "alias",
                        "target"
                      ],
                      "additionalProperties": false
                    },
                    "description": "別名の一覧すべて。空の配列ですべて削除します。"
                  },
                  "aliases_only": {
                    "type": "boolean",
                    "description": "別名だけを呼び出せるようにします。指定しなければそのままです。"
                  }
                },
                "required": [
                  "aliases"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/ai-gateway/hooks": {
      "put": {
        "operationId": "set_ai_gateway_hooks",
        "summary": "AI ゲートウェイのフック",
        "description": "ゲートウェイキーで呼び出すたびに問い合わせ、知らせる https アドレスを設定します。ai.before が timeout_ms 以内に 2xx を返さなければ呼び出しを拒否します（402 は残高不足としてそのまま伝えます）。ai.after は使用量・費用・状態を送り、受け取られるまで 1 日のあいだ再送します。応答に署名用のシークレットがあります。url を null にすると無効になります。オーナーと管理者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "url": {},
                    "timeout_ms": {},
                    "signing_secret": {},
                    "events": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_ai_gateway_hooks",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "フックのアドレス（https）。null で無効。"
                  },
                  "timeout_ms": {
                    "type": "integer",
                    "minimum": 200,
                    "maximum": 10000,
                    "description": "ai.before が応答するまでの時間（ミリ秒）。既定は 2000。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/ai-gateway/keys/{id}": {
      "patch": {
        "operationId": "set_ai_gateway_key_budgets",
        "summary": "AI ゲートウェイキーの予算",
        "description": "ゲートウェイキー 1 つの予算を変更します。指定しない値はそのままです。オーナーと管理者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_ai_gateway_keys が返した id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "budgets": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_ai_gateway_key_budgets",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "daily_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 日（UTC）の予算（ドル）。null で上限なし。"
                  },
                  "weekly_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 週間（月曜始まり、UTC）の予算（ドル）。null で上限なし。"
                  },
                  "monthly_usd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "1 か月（UTC）の予算（ドル）。null で上限なし。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "revoke_ai_gateway_key",
        "summary": "AI ゲートウェイキーを無効化",
        "description": "ゲートウェイキーを無効化します。30 秒以内にすべてのサーバーで拒否されます。オーナーと管理者のみ実行できます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_ai_gateway_keys が返した id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "revoked": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "revoke_ai_gateway_key"
      }
    },
    "/projects/{ref}/ai-gateway/spend": {
      "get": {
        "operationId": "get_ai_spend",
        "summary": "AI ゲートウェイの支出",
        "description": "今日・今週・今月の支出と予算、日別・モデル別・キー別の支出をドルで返します。自分のキーで呼び出したプロバイダーは定価で計算した推定です。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 400,
              "description": "日数。既定は 30。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "spent_usd": {},
                    "budgets": {},
                    "days": {},
                    "models": {},
                    "keys": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_ai_spend"
      }
    },
    "/projects/{ref}/middleware": {
      "get": {
        "operationId": "get_middleware",
        "summary": "ミドルウェアの設定",
        "description": "サイトのミドルウェア (middleware.ts) を実行するかと、時間制限を返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "enabled": {},
                    "timeout_ms": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_middleware"
      },
      "put": {
        "operationId": "set_middleware",
        "summary": "ミドルウェアの設定を変える",
        "description": "サイトのミドルウェアをオン・オフし、時間制限 (100〜5000ms) を決めます。オフにするとデプロイし直さなくてもミドルウェアなしで配信します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "enabled": {},
                    "timeout_ms": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_middleware",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "実行する。"
                  },
                  "timeout_ms": {
                    "type": "integer",
                    "minimum": 100,
                    "maximum": 5000,
                    "description": "時間制限 (ms)。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/function-egress": {
      "put": {
        "operationId": "set_function_egress",
        "summary": "関数の外部リクエスト",
        "description": "関数がfetch()で公開されたHTTPSアドレスを呼び出すことを許可またはブロックします。今の状態はlist_functionsのegressです。30秒以内に反映されます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "egress": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_function_egress",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueで外部リクエストを許可、falseでブロックします。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/function-secrets": {
      "get": {
        "operationId": "list_function_secrets",
        "summary": "関数シークレットの一覧",
        "description": "関数だけが見るシークレットの名前と変更日時です。値はどのツールでも読み返せません。readable が false の値は開けないため関数に入りません。もう一度保存してください。表示できるのはオーナーと管理者のみです。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "secrets": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "list_function_secrets"
      },
      "post": {
        "operationId": "set_function_secrets",
        "summary": "関数シークレットの保存",
        "description": "関数だけが見るシークレットを1つ以上保存します（Webhook の署名キー、メールサービスの API キーなど）。サイトのビルドには入らず、同じ名前の環境変数より優先されます。関数は次の呼び出しから process.env で読みます。同じ名前があれば上書きし、1つでも誤りがあれば何も保存しません。保存した値は読み返せず、応答には名前だけが返ります。SUPABASE_ と BLACKWALL で始まる名前、NODE_ENV・HOME・PATH・NODE_OPTIONS・TZ は使えません。1プロジェクト100個、値1つ32KBまでです。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "saved": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_function_secrets",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "secrets": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "名前と値です。例: {\"STRIPE_WEBHOOK_SECRET\": \"whsec_…\"}。値は二度と表示しません。"
                  },
                  "dotenv": {
                    "type": "string",
                    "description": ".env ファイルの内容をまるごと。コメントと空行は読み飛ばします。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/function-secrets/copy": {
      "post": {
        "operationId": "copy_function_secrets",
        "summary": "関数シークレットのコピー",
        "description": "自分の別のプロジェクト（from）にある関数シークレットを、名前を指定してこのプロジェクト（ref）にコピーします。値はサーバーの中だけで移り、応答には名前だけが返るので、同じキーを貼り直す必要はありません。このプロジェクトにすでにある名前はスキップし（skipped）、overwrite が true なら置き換えます。from にない名前は missing で知らせ、残りはコピーします。一度に50個までです。両方のプロジェクトでオーナーか管理者である必要があります（組織が違っても構いません）。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "from": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "copy_function_secrets",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "コピー元プロジェクトの ref です。list_projects で確認できます。"
                  },
                  "names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "コピーするシークレット名です。from プロジェクトの list_function_secrets の name。例: [\"ANTHROPIC_API_KEY\"]"
                  },
                  "overwrite": {
                    "type": "boolean",
                    "description": "このプロジェクトに同じ名前があるとき置き換えるかどうか。既定は false（スキップ）。"
                  }
                },
                "required": [
                  "from",
                  "names"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/function-secrets/{name}": {
      "delete": {
        "operationId": "delete_function_secret",
        "summary": "関数シークレットの削除",
        "description": "関数シークレットを1つ削除します。値は元に戻せず、関数は次の呼び出しからこの値なしで動きます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "functions"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_function_secrets の name です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "deleted": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "delete_function_secret"
      }
    },
    "/projects/{ref}/volumes": {
      "get": {
        "operationId": "list_volumes",
        "summary": "ボリューム一覧",
        "description": "アプリのボリューム(サーバーを再起動しても、新しくデプロイしても残るディスク)とバックアップ、プランが許す合計(max_gb)と今の使用量(used_gb)、アプリごとにサーバーが待ち受けるポート(apps[].listens_on)を返します。ボリュームは本番サーバーにだけ付きます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "max_gb": {},
                    "used_gb": {},
                    "volumes": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_volumes"
      },
      "post": {
        "operationId": "create_volume",
        "summary": "ボリュームを作成",
        "description": "アプリの本番サーバーにボリュームを付けます。コンテナの mount_path に読み書きできる形で付き、容量が上限です。WordPress なら /var/www/html です。/etc・/usr・/proc・/tmp などのシステムパスには付けられません。1分以内に準備でき、サーバーが再起動します。オーナーと管理者だけが実行できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "volume": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_volume",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app": {
                    "type": "string",
                    "description": "list_apps の name。"
                  },
                  "mount_path": {
                    "type": "string",
                    "description": "コンテナ内の絶対パス。例: /var/www/html"
                  },
                  "size_gb": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 500,
                    "description": "容量(GB)。1 から 500 まで、既定は 1。"
                  }
                },
                "required": [
                  "app",
                  "mount_path"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/volumes/{id}": {
      "patch": {
        "operationId": "resize_volume",
        "summary": "ボリュームを拡張",
        "description": "サーバーを止めずにボリュームを大きくします。小さくすることはできません。オーナーと管理者だけが実行できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_volumes のボリューム id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "volume": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "resize_volume",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "size_gb": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 500,
                    "description": "容量(GB)。1 から 500 まで。"
                  }
                },
                "required": [
                  "size_gb"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_volume",
        "summary": "ボリュームを削除",
        "description": "ボリュームとその中のファイル、ボリュームのバックアップをすべて削除します。本番サーバーはボリュームなしで再起動します。元に戻せないので、ユーザーがはっきり求めたときだけ使い、confirm にボリュームのパス(mount_path)をそのまま入れてください。オーナーと管理者だけが実行できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_volumes のボリューム id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "volume": {},
                    "deleted": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "delete_volume",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "ボリュームのパス。list_volumes の mount_path と完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/volumes/{id}/backups": {
      "post": {
        "operationId": "create_volume_backup",
        "summary": "ボリュームをバックアップ",
        "description": "ボリュームのファイルを今まとめて 30 日間保管します。数分以内に終わり、list_volumes の backups に表示されます。オーナーと管理者だけが実行できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_volumes のボリューム id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "volume_id": {},
                    "backup": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_volume_backup"
      }
    },
    "/projects/{ref}/volumes/{id}/restore": {
      "post": {
        "operationId": "restore_volume_backup",
        "summary": "ボリュームを復元",
        "description": "ボリュームの今のファイルをバックアップのファイルに置き換えます。バックアップの後に変わったファイルはなくなりますが、置き換える前に今のファイルを 7 日間バックアップしておくので、そのバックアップで元に戻せます。ユーザーが求めたときだけ使ってください。オーナーと管理者だけが実行できます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_volumes のボリューム id。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "volume": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "restore_volume_backup",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "backup_id": {
                    "type": "string",
                    "description": "list_volumes の backups[].id のうち、status が ready のもの。"
                  }
                },
                "required": [
                  "backup_id"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/server-memory": {
      "get": {
        "operationId": "get_server_memory",
        "summary": "サーバーメモリ",
        "description": "このプロジェクトのサーバーデプロイが使うメモリ(MB)と CPU 数、プランの上限、1GB・時間あたりの料金と、1か月動かし続けたときの金額です。本番とブランチのアドレスのサーバーはリクエストがなくても常に動いている(最小インスタンス 1)ため、その金額がサーバー 1 つの 1 か月の料金です。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "server_memory_mb": {},
                    "cpus": {},
                    "max_server_memory_mb": {},
                    "sizes": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_server_memory"
      },
      "put": {
        "operationId": "set_server_memory",
        "summary": "サーバーメモリの変更",
        "description": "このプロジェクトのサーバーデプロイ(Node サーバー、ワーカー)が使うメモリを 512・1024・2048・4096MB から選びます。1024MB を超えると CPU は2つです。使った分は runtime_gb_hour で計量されます。1分以内に新しいサイズで再起動します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_server_memory",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "memory_mb": {
                    "type": "integer",
                    "enum": [
                      512,
                      1024,
                      2048,
                      4096
                    ],
                    "description": "メモリ(MB): 512、1024、2048、4096 のいずれか。"
                  }
                },
                "required": [
                  "memory_mb"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/gpu": {
      "get": {
        "operationId": "list_gpu",
        "summary": "GPU ジョブとサーバー",
        "description": "このプロジェクトの GPU ジョブ(最新50件)、GPU サーバー、GPU ストレージ、マシンごとの1時間料金とストレージ1GB・月の料金、選べる地域とデータセンター、組織が同時に使える GPU の数と今使っている数を返します。無料プランでは GPU を使えません。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "prices": {},
                    "max_gpus": {},
                    "in_use": {},
                    "jobs": {},
                    "servers": {},
                    "volumes": {},
                    "volume_price": {},
                    "max_volume_gb": {},
                    "volume_gb": {},
                    "regions": {},
                    "datacenters": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_gpu"
      }
    },
    "/projects/{ref}/gpu/jobs": {
      "post": {
        "operationId": "create_gpu_job",
        "summary": "GPU ジョブを作る",
        "description": "GPU を借りて、公開コンテナイメージでコマンドを最後まで実行します(学習、一括処理)。コマンドが終わるか max_minutes を過ぎると GPU を返し、使った秒数をマシンごとの時間料金で請求します。結果はプロジェクトのストレージなど外部に保存しないと残りません。イメージには開始と終了を知らせるため curl、wget、python3 のいずれかが必要です。イメージの取得も GPU の使用時間なので請求され、max_minutes にも含まれます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_gpu_job",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "gpu": {
                    "type": "string",
                    "enum": [
                      "rtx4090",
                      "l40s",
                      "a100",
                      "h100"
                    ],
                    "description": "rtx4090、l40s、a100、h100 のいずれか"
                  },
                  "image": {
                    "type": "string",
                    "description": "公開イメージ。例: pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime"
                  },
                  "command": {
                    "type": "string",
                    "description": "sh で実行するコマンド"
                  },
                  "name": {
                    "type": "string",
                    "description": "名前"
                  },
                  "env": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "環境変数。封印して保管します"
                  },
                  "max_minutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10080,
                    "description": "既定は60分"
                  },
                  "region": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "asia",
                      "us",
                      "eu"
                    ],
                    "description": "借りる地域。既定は auto(空きマシンがあるところならどこでも)。asia は日本・インドです。ストレージを選ぶと、そのストレージのデータセンターで借ります。"
                  },
                  "volume": {
                    "type": "string",
                    "description": "/workspace に付ける GPU ストレージの名前(create_gpu_volume で作ったもの)"
                  }
                },
                "required": [
                  "gpu",
                  "image",
                  "command"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/gpu/jobs/{id}": {
      "get": {
        "operationId": "get_gpu_job",
        "summary": "GPU ジョブを見る",
        "description": "GPU ジョブ1件の状態、使った時間と金額、終了コード、出力の最後の部分(最大64KB)を返します。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ジョブ ID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {},
                    "name": {},
                    "gpu": {},
                    "image": {},
                    "command": {},
                    "max_minutes": {},
                    "status": {},
                    "created_at": {},
                    "started_at": {},
                    "ended_at": {},
                    "seconds": {},
                    "cost_minor": {},
                    "exit_code": {},
                    "error": {},
                    "region": {},
                    "volume": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_gpu_job"
      }
    },
    "/projects/{ref}/gpu/jobs/{id}/cancel": {
      "post": {
        "operationId": "cancel_gpu_job",
        "summary": "GPU ジョブを止める",
        "description": "GPU ジョブを止めます。開始前なら開始せず、実行中なら GPU を返します。返すまでの時間は請求されます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ジョブ ID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {},
                    "name": {},
                    "gpu": {},
                    "image": {},
                    "command": {},
                    "max_minutes": {},
                    "status": {},
                    "created_at": {},
                    "started_at": {},
                    "ended_at": {},
                    "seconds": {},
                    "cost_minor": {},
                    "exit_code": {},
                    "error": {},
                    "region": {},
                    "volume": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "cancel_gpu_job"
      }
    },
    "/projects/{ref}/gpu/servers": {
      "post": {
        "operationId": "create_gpu_server",
        "summary": "GPU サーバーを作る",
        "description": "公開イメージでモデルを動かしておく GPU サーバーを作ります。https://<ref>.<zone>/gpu/v1/servers/<name>/ を secret キーで呼ぶと、止まっていれば起動し(その間は503)、リクエストを渡します。idle_minutes の間リクエストがなければ止めます(0は動かし続けます)。起動を始めた時点から止まるまで、イメージの取得時間も含めて秒単位で請求します。サーバーには x-oneend-gpu-token ヘッダーと同じ値が ONEEND_GPU_TOKEN で渡ります。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_gpu_server",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "英小文字、数字、ハイフン"
                  },
                  "gpu": {
                    "type": "string",
                    "enum": [
                      "rtx4090",
                      "l40s",
                      "a100",
                      "h100"
                    ],
                    "description": "rtx4090、l40s、a100、h100 のいずれか"
                  },
                  "image": {
                    "type": "string",
                    "description": "公開イメージ。例: vllm/vllm-openai:latest"
                  },
                  "command": {
                    "type": "string",
                    "description": "空ならイメージ既定のコマンド"
                  },
                  "env": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "環境変数。封印して保管します"
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535,
                    "description": "既定は8000"
                  },
                  "idle_minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1440,
                    "description": "既定は15分、0は動かし続けます"
                  },
                  "region": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "asia",
                      "us",
                      "eu"
                    ],
                    "description": "借りる地域。既定は auto(空きマシンがあるところならどこでも)。asia は日本・インドです。ストレージを選ぶと、そのストレージのデータセンターで借ります。"
                  },
                  "volume": {
                    "type": "string",
                    "description": "/workspace に付ける GPU ストレージの名前(create_gpu_volume で作ったもの)"
                  }
                },
                "required": [
                  "name",
                  "gpu",
                  "image"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/gpu/servers/{name}/stop": {
      "post": {
        "operationId": "stop_gpu_server",
        "summary": "GPU サーバーを止める",
        "description": "GPU サーバーを今止めます。止まるまでの時間は請求します。次のリクエストでまた起動します。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "サーバー名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "stop_gpu_server"
      }
    },
    "/projects/{ref}/gpu/servers/{name}": {
      "delete": {
        "operationId": "delete_gpu_server",
        "summary": "GPU サーバーを削除する",
        "description": "GPU サーバーを削除します。動いていれば先に止めてから削除します。元に戻せないので、confirm に GPU サーバー名をそのまま入れてください。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "サーバー名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "deleted": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "delete_gpu_server",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "GPU サーバー名です。nameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/gpu/volumes": {
      "post": {
        "operationId": "create_gpu_volume",
        "summary": "GPU ストレージを作る",
        "description": "モデルとデータを残しておく GPU ストレージを1つのデータセンターに作ります。ジョブやサーバーに volume として名前を渡すと /workspace に付き、毎回ダウンロードし直さずに済みます。ストレージがある間は、使っても使わなくても1GB・月の料金で請求します。そのストレージを使うジョブとサーバーは、そのデータセンターでしか GPU を借りられません。無料プランでは使えません。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_gpu_volume",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "英小文字、数字、ハイフン"
                  },
                  "size_gb": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 4000,
                    "description": "既定は50GB"
                  },
                  "datacenter": {
                    "type": "string",
                    "description": "データセンター。例: AP-JP-1(日本)。一覧は list_gpu にあります"
                  }
                },
                "required": [
                  "name",
                  "datacenter"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/gpu/volumes/{name}": {
      "delete": {
        "operationId": "delete_gpu_volume",
        "summary": "GPU ストレージを削除する",
        "description": "GPU ストレージとその中のファイルをすべて削除します。使っているジョブやサーバーがあれば削除しません。元に戻せません。削除するまでの保存料金は請求します。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ストレージ名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "deleted": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "delete_gpu_volume"
      }
    },
    "/projects/{ref}/mysql": {
      "get": {
        "operationId": "list_mysql_databases",
        "summary": "MySQL データベースの一覧",
        "description": "このプロジェクトの MySQL データベース（MariaDB 11.4）と、それぞれがどのアプリに入るか（app、null はプロジェクト全体）、状態、サイズ、プランで作れる数（max）を返します。available が false なら、このサーバーにはまだ MySQL がありません。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "available": {},
                    "max": {},
                    "apps": {},
                    "databases": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_mysql_databases"
      },
      "post": {
        "operationId": "create_mysql_database",
        "summary": "MySQL データベースの作成",
        "description": "WordPress のように MySQL を使うアプリのために、データベースと専用ログインを作ります。通常 1 分以内に準備できます。app を指定するとそのアプリのデプロイだけが、指定しなければプロジェクトのすべてのアプリが受け取ります（プロジェクト全体用が 1 つだけのとき）。受け取るアプリのサーバーは起動時に MYSQL_URL・MYSQL_HOST・MYSQL_PORT・MYSQL_USER・MYSQL_PASSWORD・MYSQL_DATABASE と WORDPRESS_DB_HOST・WORDPRESS_DB_USER・WORDPRESS_DB_PASSWORD・WORDPRESS_DB_NAME を受け取ります（ビルドには入りません）。毎晩バックアップされます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_mysql_database",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]{0,31}$",
                    "description": "英小文字で始め、英小文字・数字・アンダースコア（_）で 32 文字まで。例: wordpress"
                  },
                  "app": {
                    "type": "string",
                    "description": "このデータベースを受け取るアプリ名。空ならプロジェクト全体用"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/mysql/{name}": {
      "patch": {
        "operationId": "bind_mysql_database",
        "summary": "MySQL データベースをアプリにつなぐ",
        "description": "MySQL データベースを受け取るアプリを変えます。app が null ならプロジェクト全体用になります。1 つのアプリにつなげるデータベースは 1 つだけです。動いているサーバーは再起動するか再デプロイすると変更を受け取ります。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "MySQL データベース名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "bind_mysql_database",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "アプリ名。プロジェクト全体用なら null"
                  }
                },
                "required": [
                  "app"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_mysql_database",
        "summary": "MySQL データベースの削除",
        "description": "MySQL データベースとそのログイン、バックアップをすべて削除します。元に戻せないので、ユーザーがはっきり求めたときだけ使い、confirm にデータベース名をそのまま入れてください。受け取っていたアプリは次の起動から MYSQL_* の変数を受け取りません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "MySQL データベース名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "deleted": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "delete_mysql_database",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "MySQL データベース名。name とまったく同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/mysql/{name}/connection": {
      "get": {
        "operationId": "get_mysql_connection",
        "summary": "MySQL の接続情報",
        "description": "MySQL データベースのアドレス、ポート、データベース名、ログイン、パスワードと、アプリが受け取る変数（variables）を返します。アドレスにはこのサーバー上のアプリからだけ届きます。パスワードは書き込み権限のトークンにだけ表示されます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "MySQL データベース名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "host": {},
                    "port": {},
                    "database": {},
                    "user": {},
                    "password": {},
                    "url": {},
                    "variables": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "get_mysql_connection"
      }
    },
    "/projects/{ref}/mysql/{name}/backups": {
      "get": {
        "operationId": "list_mysql_backups",
        "summary": "MySQL バックアップの一覧",
        "description": "MySQL データベースのバックアップ（毎晩の自動、手動で作ったもの、復元の直前のもの）と復元の記録を返します。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "MySQL データベース名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "backups": {},
                    "restores": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_mysql_backups"
      },
      "post": {
        "operationId": "create_mysql_backup",
        "summary": "MySQL を今すぐバックアップ",
        "description": "MySQL データベースを今すぐバックアップします。プラグインの更新や大きな変更の前に作ってください。7 日間保管されます。毎晩のバックアップは別に自動で行われます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "MySQL データベース名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "id": {},
                    "status": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_mysql_backup"
      }
    },
    "/projects/{ref}/mysql/{name}/restore": {
      "post": {
        "operationId": "restore_mysql_backup",
        "summary": "MySQL をバックアップから復元",
        "description": "MySQL データベースをバックアップした時点に戻します。その後の変更はすべてなくなるので、ユーザーがはっきり求めたときだけ使い、confirm にデータベース名をそのまま入れてください。戻す直前の状態を先にバックアップするので、undo_backup_id でもう一度復元できます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "MySQL データベース名"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "restore_id": {},
                    "status": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "restore_mysql_backup",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "backup_id": {
                    "type": "string",
                    "description": "list_mysql_backups のバックアップ id"
                  },
                  "confirm": {
                    "type": "string",
                    "description": "MySQL データベース名。name とまったく同じである必要があります。"
                  }
                },
                "required": [
                  "backup_id",
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/concurrent-builds": {
      "get": {
        "operationId": "get_concurrent_builds",
        "summary": "同時ビルド",
        "description": "このプロジェクトのビルドを同時にいくつまで動かすかです。null ならビルダーが許すだけ動きます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "concurrent_builds": {},
                    "max": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_concurrent_builds"
      },
      "put": {
        "operationId": "set_concurrent_builds",
        "summary": "同時ビルドの変更",
        "description": "このプロジェクトのビルドを同時にいくつまで動かすかを 1〜20 で決めるか、null で上限をなくします。超えたビルドはキューで待ち、前のビルドが終わると始まります。待っているあいだはビルド時間が請求されません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "deployments"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "concurrent_builds": {},
                    "max": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_concurrent_builds",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "concurrent_builds": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 20,
                    "description": "1〜20 の整数、または上限なしの null。"
                  }
                },
                "required": [
                  "concurrent_builds"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/network": {
      "get": {
        "operationId": "get_projects_ref_network",
        "summary": "ネットワークアドレス",
        "description": "プロジェクトがリクエストを受けるアドレス（inbound、カスタムドメインのAレコード）と、固定アウトバウンドIPをオンにしたプロジェクトなら外部へ送信する固定アドレス（outbound.addresses）を返します。オンにしていないプロジェクトの送信アドレスは固定されていない共有アドレスのため返しません。許可リストには追加しないでください。",
        "tags": [
          "network"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "region": {},
                    "inbound": {},
                    "outbound": {},
                    "static_outbound_ip": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_network"
      }
    },
    "/projects/{ref}/network/ips": {
      "get": {
        "operationId": "get_projects_ref_network_ips",
        "summary": "ネットワークアドレス",
        "description": "プロジェクトがリクエストを受けるアドレス（inbound、カスタムドメインのAレコード）と、固定アウトバウンドIPをオンにしたプロジェクトなら外部へ送信する固定アドレス（outbound.addresses）を返します。オンにしていないプロジェクトの送信アドレスは固定されていない共有アドレスのため返しません。許可リストには追加しないでください。",
        "tags": [
          "network"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "region": {},
                    "inbound": {},
                    "outbound": {},
                    "static_outbound_ip": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_network"
      }
    },
    "/projects/{ref}/network/static-outbound-ip": {
      "post": {
        "operationId": "post_projects_ref_network_static_outbound_ip",
        "summary": "固定アウトバウンドIP",
        "description": "有料オプションの固定アウトバウンドIPをオンまたはオフにします。オンにすると、サーバーデプロイ、関数のfetch()、データベースWebhookが固定アドレスから送信され、月額料金が利用期間に応じて請求されます。Pro以上のプランで、オーナー・管理者・請求担当者だけが実行できます。料金がかかるため、ユーザーがはっきり求めたときだけ使ってください。料金と今の状態はget_networkにあります。アドレスがまだないリージョンでは outcome が provisioning になります。アドレスを作成中（通常1時間以内）で、準備ができるまで料金は発生せず、アドレスも返されません。",
        "tags": [
          "network"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "active": {},
                    "status": {},
                    "outcome": {},
                    "addresses": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "billing.manage (オーナーまたは管理者または請求担当)"
        ],
        "x-oneend-mcp-tool": "set_static_outbound_ip"
      },
      "delete": {
        "operationId": "delete_projects_ref_network_static_outbound_ip",
        "summary": "固定アウトバウンドIP",
        "description": "有料オプションの固定アウトバウンドIPをオンまたはオフにします。オンにすると、サーバーデプロイ、関数のfetch()、データベースWebhookが固定アドレスから送信され、月額料金が利用期間に応じて請求されます。Pro以上のプランで、オーナー・管理者・請求担当者だけが実行できます。料金がかかるため、ユーザーがはっきり求めたときだけ使ってください。料金と今の状態はget_networkにあります。アドレスがまだないリージョンでは outcome が provisioning になります。アドレスを作成中（通常1時間以内）で、準備ができるまで料金は発生せず、アドレスも返されません。",
        "tags": [
          "network"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "active": {},
                    "status": {},
                    "outcome": {},
                    "addresses": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "billing.manage (オーナーまたは管理者または請求担当)"
        ],
        "x-oneend-mcp-tool": "set_static_outbound_ip"
      }
    },
    "/projects/{ref}/team": {
      "get": {
        "operationId": "list_team",
        "summary": "チームメンバー",
        "description": "このプロジェクトを所有する組織のメンバーを、役割、2段階認証を使っているかどうか、まだ承諾されていない招待とともに返します。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "mfa_required": {},
                    "members": {},
                    "invitations": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_team"
      }
    },
    "/projects/{ref}/team/invitations": {
      "post": {
        "operationId": "invite_member",
        "summary": "メンバーの招待",
        "description": "招待リンクをメールで送ります。リンクを開くと参加するため、すぐに追加される人はいません。すでにメンバーのアドレスなら、役割だけを変更します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "email": {},
                    "role": {},
                    "outcome": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "invite_member",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "招待するメールアドレスです。"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "developer",
                      "billing",
                      "viewer"
                    ],
                    "description": "空ならdeveloperです。"
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/team/invitations/{id}": {
      "delete": {
        "operationId": "cancel_invitation",
        "summary": "招待の取り消し",
        "description": "送った招待を取り消します。そのリンクはすぐに開けなくなります。idはlist_teamのinvitationsにあります。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_teamの招待idです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "cancelled": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "cancel_invitation"
      }
    },
    "/projects/{ref}/team/members/{email}": {
      "patch": {
        "operationId": "set_member_role",
        "summary": "メンバーの役割の変更",
        "description": "すでにメンバーである人の役割を変更します。オーナーの役割は変更できません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "メンバーのメールアドレスです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "email": {},
                    "role": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_member_role",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "developer",
                      "billing",
                      "viewer"
                    ],
                    "description": "新しい役割です。"
                  }
                },
                "required": [
                  "role"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_member",
        "summary": "メンバーの削除",
        "description": "組織から人を外します。オーナーは外せません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "メンバーのメールアドレスです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "email": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "remove_member"
      }
    },
    "/projects/{ref}/team/mfa": {
      "put": {
        "operationId": "set_mfa_required",
        "summary": "2段階認証の必須化",
        "description": "組織のすべてのメンバーに2段階認証を必須にする、または必須をやめます。オンにするには、このトークンの所有者が先に2段階認証をオンにしている必要があります。2段階認証がないメンバーは、オンにするまでこの組織を開けず、応答のwithout_mfaに表示されます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "mfa_required": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_mfa_required",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "required": {
                    "type": "boolean",
                    "description": "trueで必須にし、falseで必須をやめます。"
                  }
                },
                "required": [
                  "required"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/channels": {
      "get": {
        "operationId": "list_channels",
        "summary": "通知チャンネル",
        "description": "デプロイ、ドメイン、使用量、請求のお知らせを受け取るSlack、KakaoWork、Webhookのチャンネルを、最後の送信結果とともに返します。組織全体の設定です。Webhookチャンネルの署名キー（signing_secret）は作成時（create_channel）に一度だけ表示します。一覧にはsigning_secret_setと末尾4文字（signing_secret_last4）だけを載せます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "notices": {},
                    "channels": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_channels"
      },
      "post": {
        "operationId": "create_channel",
        "summary": "通知チャンネルの追加",
        "description": "Slack（Incoming Webhookのアドレス）、KakaoWork（ボットのWebhookアドレス）、署名付きWebhook、またはメール（emailsに1〜10件のアドレス）に通知を送ります。メールチャンネルはアドレスごとに確認リンクを送り、リンクを開いたアドレスにだけ通知を送ります。noticesを空にするとすべての種類を受け取ります（usageには使用量の上限警告とトラフィック急増の通知が含まれます）。Webhookチャンネルのsigning_secretはこの応答にだけ含まれるので、受信側にすぐ保存してください。作成後にtest_channelで確認してください。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_channel",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "slack",
                      "kakaowork",
                      "webhook",
                      "email"
                    ],
                    "description": "slack、kakaowork、webhook、emailのいずれかです。"
                  },
                  "name": {
                    "type": "string",
                    "description": "チャンネルを見分けるための名前です。"
                  },
                  "url": {
                    "type": "string",
                    "description": "送信先のWebhookアドレスです。メールチャンネルでは使いません。"
                  },
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "description": "メールチャンネルの送信先アドレスです。例: [\"ops@example.com\"]。"
                  },
                  "notices": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "deployments",
                        "domains",
                        "usage",
                        "billing"
                      ]
                    },
                    "description": "受け取る種類です: deployments、domains、usage、billing。空ならすべてです。"
                  }
                },
                "required": [
                  "kind",
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/channels/{id}/test": {
      "post": {
        "operationId": "test_channel",
        "summary": "通知チャンネルのテスト",
        "description": "そのチャンネル1つにだけテストメッセージを送ります。メールチャンネルでは確認済みのアドレスにだけ送り、確認待ちのアドレスには確認メールを再送します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_channelsのidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "sent": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "test_channel"
      }
    },
    "/projects/{ref}/channels/{id}": {
      "patch": {
        "operationId": "set_channel_enabled",
        "summary": "通知チャンネルのオン・オフ",
        "description": "設定を残したまま、通知を止めるか再開します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_channelsのidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "enabled": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_channel_enabled",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueで送信、falseで停止します。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_channel",
        "summary": "通知チャンネルの削除",
        "description": "通知チャンネルを削除します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "team"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_channelsのidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "id": {},
                    "removed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "team.manage (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "remove_channel"
      }
    },
    "/projects/{ref}/extensions": {
      "get": {
        "operationId": "list_extensions",
        "summary": "データベースの拡張機能の一覧",
        "description": "有効にできるPostgreSQLの拡張機能（pgvectorのvector、postgis、citext、pgcryptoなど）と、それぞれがこのサーバーにあるか（available）、有効か（enabled）、バージョンを返します。拡張機能はextensionsスキーマにインストールされ、SQLではそのままvector(1536)やgeometryのように使います。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "extensions": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_extensions"
      }
    },
    "/projects/{ref}/extensions/{name}": {
      "put": {
        "operationId": "enable_extension",
        "summary": "データベースの拡張機能を有効にする",
        "description": "拡張機能を1つ有効にします（create extension ... with schema extensions）。埋め込み検索にはvector、地図や距離の計算にはpostgisを使います。一覧にない拡張機能は拒否されます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "拡張機能の名前です: vector, postgis, citext, hstore, uuid-ossp, pgcrypto, ltree, fuzzystrmatch, btree_gin, btree_gist, intarray, tablefunc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "extension": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "enable_extension"
      },
      "delete": {
        "operationId": "disable_extension",
        "summary": "データベースの拡張機能を無効にする",
        "description": "拡張機能を1つ無効にします。その拡張機能を使う列、インデックス、関数が残っていると拒否されます。同じデータベースのほかのプロジェクトが使っている場合、インストールは残り、このプロジェクトの記録だけが削除されます（note）。pg_trgmとunaccentは標準で有効なため無効にできません。confirm に拡張機能の名前をそのまま入れてください。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "list_extensionsにある拡張機能の名前です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "extension": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "disable_extension",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "拡張機能の名前です。nameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/branches": {
      "get": {
        "operationId": "list_branches",
        "summary": "データベースブランチの一覧",
        "description": "このプロジェクトのデータベースブランチです。名前、ブランチ自身のプロジェクトref（ほかのすべてのツールにそのまま使います）、紐づくgitブランチ、状態（creating、ready、merging、resetting、failed、deleting）、サイズ、期限を返します。自動ブランチの設定も返します。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "automatic": {},
                    "lifetime_days": {},
                    "has_seed": {},
                    "branches": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_branches"
      },
      "post": {
        "operationId": "create_branch",
        "summary": "データベースブランチを作成する",
        "description": "プロジェクトのスキーマからプレビュー用のデータベースを作ります。プロジェクトのマイグレーション（apply_migrationsが記録した履歴）を順に再実行し、シードを入れます。データはwith_dataを指定したときだけコピーします。ブランチは独自のrefを持つプロジェクトで、run_sqlやget_project_keysなどすべてのツールにそのrefを使います。git_branchを指定すると、そのブランチのプレビューデプロイがこのデータベースを使います。Proプランから使えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "branch": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_branch",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "ブランチ名です（英小文字、数字、-、30文字まで）。省略するとgit_branchから作ります。"
                  },
                  "git_branch": {
                    "type": "string",
                    "description": "紐づけるgitブランチです。そのブランチのプレビューデプロイに、このデータベースのアドレス、キー、接続文字列が入ります。"
                  },
                  "with_seed": {
                    "type": "boolean",
                    "description": "falseならシードを入れません。"
                  },
                  "with_data": {
                    "type": "boolean",
                    "description": "trueならプロジェクトの行までコピーします（マイグレーションの再実行とシードの代わり）。ファイルとその行はコピーしません。データが512MBを超えると断ります。進み具合はlist_branchesのcopyに出ます。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/branching": {
      "put": {
        "operationId": "set_branching",
        "summary": "自動データベースブランチの設定",
        "description": "プレビューとしてデプロイされるgitブランチごとにデータベースブランチを自動で作るか、すべてのブランチに入れるシードSQL、使われていないブランチを残す日数（1から90日、デプロイのたびに延長）を設定します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "automatic": {},
                    "lifetime_days": {},
                    "has_seed": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_branching",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "automatic": {
                    "type": "boolean",
                    "description": "trueならプレビューブランチごとに自動で作ります。"
                  },
                  "seed_sql": {
                    "type": "string",
                    "description": "新しいブランチでマイグレーションの後に実行するSQLです（1MBまで）。空文字列なら削除します。"
                  },
                  "lifetime_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90,
                    "description": "最後のデプロイの後、ブランチを残す日数です。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/branches/{name}/merge": {
      "post": {
        "operationId": "merge_branch",
        "summary": "データベースブランチをマージする",
        "description": "ブランチにだけあるマイグレーションを、バージョン順にプロジェクト（本番）へ適用します。1つずつ独自のトランザクションで実行し、失敗したらそれだけを元に戻して止まります。データは移しません。ブランチでスキーマを変えるときは、マージされるようにrun_sqlではなくapply_migrationsを使ってください。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ブランチ名です（list_branchesのname）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "merge_branch"
      }
    },
    "/projects/{ref}/branches/{name}/reset": {
      "post": {
        "operationId": "reset_branch",
        "summary": "データベースブランチを初期化する",
        "description": "ブランチのデータベースを削除し、プロジェクトのマイグレーションとシードから作り直します。ブランチのデータとユーザーはすべて失われ、バックアップは残りません。confirm にブランチ名をそのまま入れてください。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ブランチ名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "branch": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "reset_branch",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "ブランチ名です。nameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/branches/{name}": {
      "delete": {
        "operationId": "delete_branch",
        "summary": "データベースブランチを削除する",
        "description": "ブランチと、そのデータベースやキーを削除します。元に戻せないので、confirm にブランチ名をそのまま入れてください。gitブランチを削除するかプルリクエストを閉じると自動で削除されます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ブランチ名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "branch": {},
                    "deleted": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "delete_branch",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "ブランチ名です。nameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/queues": {
      "get": {
        "operationId": "list_queues",
        "summary": "キューの一覧",
        "description": "キュー（pgmqと同じSQL関数: pgmq.send、pgmq.read、pgmq.pop、pgmq.archive、pgmq.delete）と、それぞれのメッセージ数、今読める数、アーカイブされた数、最も古いメッセージの経過時間を返します。enabledはpgmqがインストールされているか、exposedはデータAPI（pgmq_public）から呼べるかです。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_queues"
      },
      "post": {
        "operationId": "create_queue",
        "summary": "キューを作成する",
        "description": "キューを1つ作ります（pgmq.create）。初回はpgmqもインストールします。メッセージはpgmq.q_<名前>テーブルに保存され、SQLではpgmq.send(名前, メッセージ)で入れ、pgmq.read(名前, 秒, 件数)で読みます。専用データベースでのみ使えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "create_queue",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "キュー名です（英小文字、数字、_、47文字まで）。"
                  },
                  "unlogged": {
                    "type": "boolean",
                    "description": "trueならWALを書かない高速なテーブルで作ります（サーバーが異常終了するとメッセージを失います）。"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/queues/metrics": {
      "get": {
        "operationId": "get_queue_metrics",
        "summary": "キューの指標",
        "description": "5 分ごとに測ったキューの記録から、各キューの現在の待機数・読めるメッセージ数・最長待ち時間・アーカイブ数と、キュー全体の時間ごとの待機数・送信数・処理数を返します。既定は 24 時間、最大 168 時間。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "hours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 168,
              "description": "時間数。既定は 24。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "hours": {},
                    "queues": {},
                    "points": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_queue_metrics"
      }
    },
    "/projects/{ref}/queues/api": {
      "put": {
        "operationId": "set_queues_api",
        "summary": "キューをデータAPIに公開する",
        "description": "trueならpgmq_publicスキーマ（send、send_batch、read、pop、archive、delete）を作り、データAPIからsupabase.schema(\"pgmq_public\").rpc(\"send\", ...)で呼べるようにします。呼び出した人の権限で実行されるため、公開キーやログインユーザーが使うには、キューのテーブルに権限とアクセスルールを与えてください。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_queues_api",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exposed": {
                    "type": "boolean",
                    "description": "trueで公開、falseで非公開にします。"
                  }
                },
                "required": [
                  "exposed"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/queues/{name}": {
      "delete": {
        "operationId": "delete_queue",
        "summary": "キューを削除する",
        "description": "キューと、そのメッセージ、アーカイブを削除します（pgmq.drop_queue）。元に戻せないので、confirm にキュー名をそのまま入れてください。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "キュー名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "queue": {},
                    "dropped": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "delete_queue",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "キュー名です。nameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/queues/{name}/purge": {
      "post": {
        "operationId": "purge_queue",
        "summary": "キューを空にする",
        "description": "キューのメッセージをすべて削除します（pgmq.purge_queue）。アーカイブは残します。元に戻せないので、confirm にキュー名をそのまま入れてください。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "キュー名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "queue": {},
                    "purged": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "purge_queue",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "description": "キュー名です。nameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/queues/{name}/messages": {
      "post": {
        "operationId": "send_queue_message",
        "summary": "キューにメッセージを入れる",
        "description": "JSONのメッセージを1つキューに入れます（pgmq.send）。delay秒の間は読めません。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "キュー名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "queue": {},
                    "msg_id": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "send_queue_message",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "description": "入れるメッセージです。JSONの値なら何でも構いません。"
                  },
                  "delay": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "この秒数が過ぎてから読めるようにします。"
                  }
                },
                "required": [
                  "message"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "peek_queue",
        "summary": "キューのメッセージを見る",
        "description": "キューの先頭のメッセージを、取り出さずに見ます。読み取り回数も可視性の時刻も変えないため、ワーカーが受け取るはずのメッセージを横取りしません。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "キュー名です。"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "見るメッセージの数です（既定は20）。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "queue": {},
                    "messages": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "peek_queue"
      }
    },
    "/projects/{ref}/vault": {
      "get": {
        "operationId": "list_vault_secrets",
        "summary": "Vaultのシークレットの一覧",
        "description": "Vaultに保存したシークレットの名前と説明です。値は返しません。プロジェクトのコードはシークレットキーでselect decrypted_secret from vault.decrypted_secrets where name = ...として読みます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "enabled": {},
                    "secrets": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "secrets.read (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "list_vault_secrets"
      },
      "post": {
        "operationId": "create_vault_secret",
        "summary": "Vaultにシークレットを保存する",
        "description": "シークレットを1つ暗号化し、プロジェクトのデータベースのvault.secretsに保存します（vault.create_secret）。鍵はプラットフォームが持ち、データベースには保存されないため、ダンプやバックアップには暗号文だけが残ります。初回はVaultを有効にします。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "secret": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "create_vault_secret",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "シークレット名です（英字か_で始まり、128文字まで）。"
                  },
                  "value": {
                    "type": "string",
                    "description": "保存する値です（64KBまで）。二度と表示しません。"
                  },
                  "description": {
                    "type": "string",
                    "description": "説明です（500文字まで）。"
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/vault/{name}": {
      "patch": {
        "operationId": "update_vault_secret",
        "summary": "Vaultのシークレットを変更する",
        "description": "シークレットの値や説明を変更します（vault.update_secret）。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "シークレット名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "secret": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "update_vault_secret",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "新しい値です。"
                  },
                  "description": {
                    "type": "string",
                    "description": "新しい説明です。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_vault_secret",
        "summary": "Vaultのシークレットを削除する",
        "description": "シークレットを1つ削除します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "シークレット名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "name": {},
                    "deleted": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "delete_vault_secret"
      }
    },
    "/projects/{ref}/database/move": {
      "get": {
        "operationId": "get_database_move",
        "summary": "専用データベースへの移行の状態",
        "description": "このプロジェクトが専用データベースにあるか（dedicated）、プランに含まれるか（plan_allows）、移行を依頼したか・移行中か・失敗して止まったか（stopped、last_error）を示します。size_bytesがauto_move_max_bytesより大きいと自動では移行しないため、move_to_dedicated_databaseで依頼してください。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_database_move"
      },
      "post": {
        "operationId": "move_to_dedicated_database",
        "summary": "専用データベースへの移行",
        "description": "共用データベースにあるプロジェクトを、専用のデータベースへ移行するよう依頼します。コンソールの「今すぐ移行」と同じです。順番が来ると移行し、移行中は書き込みが止まり、読み取りは続きます。移行直前の状態がバックアップとして残り、失敗した場合は元の場所にそのまま残ります（止まった移行は、もう一度依頼すると再試行します）。Vaultや大きなデータベースに必要です。Proプランから含まれます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "move_to_dedicated_database"
      }
    },
    "/projects/{ref}/database/dedicated-disk": {
      "get": {
        "operationId": "get_dedicated_disk",
        "summary": "専用ディスク",
        "description": "データベースが大きくなったプロジェクトが使う、このプロジェクトだけのディスクと Postgres を示します。サイズ（size_gb）、使用量、月額、30日間の履歴、進行中の依頼と縮小の提案（shrink）です。まだ共有ディスクにある場合は、移す基準（threshold_gb）と現在のデータベースのサイズを示します。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_dedicated_disk"
      },
      "post": {
        "operationId": "request_dedicated_disk",
        "summary": "専用ディスクに移す",
        "description": "このプロジェクトのデータベースを専用ディスク（max(1.2 × データベース, 20GB)）に移すよう依頼します。コンソールの「専用ディスクに移す」と同じです。ディスクは作成したサイズに対して1GBあたり月 ₩1,200（75セント）で請求し、移している間は書き込みが失敗し、読み取りはできます（get_dedicated_disk の expected_downtime_seconds）。Enterprise はいつでも、ほかの有料プランは基準を超えると依頼できます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "request_dedicated_disk"
      }
    },
    "/projects/{ref}/database/dedicated-disk/shrink": {
      "post": {
        "operationId": "shrink_dedicated_disk",
        "summary": "ディスクを縮小",
        "description": "専用ディスクを縮小します。より小さいディスク（1.2 × データベース、最小20GB）を新しく作って移し、元のディスクを削除します。7日間 25% 未満の使用が続いたディスクだけ縮小できます（get_dedicated_disk の shrink.suggested）。移している間は書き込みが失敗し、読み取りはできます。自動で縮小することはありません。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "shrink_dedicated_disk"
      }
    },
    "/projects/{ref}/network-restrictions": {
      "get": {
        "operationId": "get_network_restrictions",
        "summary": "データベースの接続制限",
        "description": "データベースに直接（5432と6543）接続できるアドレスと、TLSを必須にしているかです。restrictedがfalseならすべてのアドレスが接続できます。your_address_allowedは、このリクエストを送ったアドレスが許可されているかです。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_network_restrictions"
      },
      "put": {
        "operationId": "update_network_restrictions",
        "summary": "データベースの接続制限を変更する",
        "description": "直接接続を許可するアドレス（CIDRの一覧、100個まで）と、TLSを必須にするかを変更します。allow_allならすべてのアドレスを再び許可します。このリクエストを送ったアドレスが一覧にないと、confirmなしでは拒否されます。コンソール、API、run_sqlは接続プーラーを通らないため、制限をかけても元に戻せます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "other"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "update_network_restrictions",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "allowed_cidrs": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "許可するアドレスかCIDRです（例: 203.0.113.0/24）。空の配列なら制限を解除します。"
                  },
                  "allow_all": {
                    "type": "boolean",
                    "description": "trueなら制限を解除し、すべてのアドレスを許可します。"
                  },
                  "enforce_ssl": {
                    "type": "boolean",
                    "description": "trueならTLS（sslmode=require）の接続だけを受け付けます。既定はtrueです。"
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "このリクエストを送ったアドレスが一覧になくても保存します。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/realtime": {
      "get": {
        "operationId": "list_realtime_tables",
        "summary": "リアルタイムがオンのテーブル",
        "description": "変更がリアルタイムで送られるテーブルです。ここにないテーブルを購読しても何も届きません。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "tables": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "list_realtime_tables"
      }
    },
    "/projects/{ref}/realtime/{table}": {
      "put": {
        "operationId": "set_realtime",
        "summary": "テーブルのリアルタイムのオン・オフ",
        "description": "テーブル1つの変更通知をオンまたはオフにします。通知もアクセスルールを通過する行についてだけ送られます。",
        "tags": [
          "database"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "テーブル名です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "tables": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "data.write (オーナーまたは管理者または開発者)"
        ],
        "x-oneend-mcp-tool": "set_realtime",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueでオン、falseでオフにします。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/metrics": {
      "get": {
        "operationId": "get_metrics",
        "summary": "メトリクス",
        "description": "リクエスト数、失敗数、レイテンシ（p50/p95/p99）を対象別と時間別に、データベースのサイズ、接続数、キャッシュヒット率とともに返します。",
        "tags": [
          "logs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1h",
                "24h",
                "7d"
              ],
              "description": "空なら24hです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "range": {},
                    "requests": {},
                    "failures": {},
                    "latency_ms": {},
                    "by_surface": {},
                    "points": {},
                    "database": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_metrics"
      }
    },
    "/projects/{ref}/billing/plan": {
      "get": {
        "operationId": "get_plan",
        "summary": "料金プラン",
        "description": "組織の今の料金プラン、予約された変更、選べるプランと月額料金、組織で有効な有料オプション（addons）です。無料プランなら free にその制限（1 人、独自ドメインなし、1 日のデプロイ回数、3 日間未使用で一時停止、ビルド時間と転送量）と Pro だけの機能があります。オプションはそれぞれのツール（set_static_outbound_ip）でオン・オフします。プランの変更は支払いが必要なので、コンソールの請求画面でのみ行えます。オーナー、管理者、請求担当のメンバーだけが見られます。",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "currency": {},
                    "plan": {},
                    "scheduled": {},
                    "options": {},
                    "billed_by": {},
                    "addons": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "billing.manage (オーナーまたは管理者または請求担当)"
        ],
        "x-oneend-mcp-tool": "get_plan"
      }
    },
    "/projects/{ref}/billing/spend": {
      "get": {
        "operationId": "get_spend_controls",
        "summary": "支出の上限",
        "description": "支出キャップ（オンにすると無料枠を超える使用を止め、超過料金を請求しません）、月の超過料金の上限と通知Webhook、今月の使用量を表示します。オーナー、管理者、請求担当のメンバーだけが見られます。",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "spend_cap": {},
                    "spend_cap_applies": {},
                    "spend_limit_minor": {},
                    "spend_limit_floor_minor": {},
                    "webhook_url": {},
                    "progress": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "billing.manage (オーナーまたは管理者または請求担当)"
        ],
        "x-oneend-mcp-tool": "get_spend_controls"
      }
    },
    "/projects/{ref}/billing/spend-cap": {
      "put": {
        "operationId": "set_spend_cap",
        "summary": "支出キャップのオンとオフ",
        "description": "有料プランの支出キャップをオンまたはオフにします。オンなら無料枠で止まり、超過料金はありません（コンソールの支出上限の「含まれる量まで」）。オフなら超えた分が請求されるため、オフにするときは confirm にプロジェクト名（list_projectsのname）をそのまま入れてください。オーナー、管理者、請求担当のメンバーだけが行えます。",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "spend_cap": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "billing.manage (オーナーまたは管理者または請求担当)"
        ],
        "x-oneend-mcp-tool": "set_spend_cap",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "trueでオンにします。"
                  },
                  "confirm": {
                    "type": "string",
                    "description": "オフにするとき（enabled: false）だけ: プロジェクト名です。list_projectsのnameと完全に同じである必要があります。"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/billing/spend-limit": {
      "put": {
        "operationId": "set_spend_limit",
        "summary": "月の支出上限",
        "description": "1か月の超過料金の上限（通貨の最小単位、ウォン）と、上限に近づいたときに通知するWebhookアドレスを決めます。支出キャップがオフのとき、コンソールの支出上限の「決めた金額まで許可」（nullなら「無制限」）と同じです。spend_limit_minorをnullにすると上限をなくします。webhook_urlを省くと今のアドレスのままです。新しい通知先は通知チャネル（create_channel）で受け取ることをおすすめします。オーナー、管理者、請求担当のメンバーだけが行えます。",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "spend_cap": {},
                    "spend_cap_applies": {},
                    "spend_limit_minor": {},
                    "spend_limit_floor_minor": {},
                    "webhook_url": {},
                    "progress": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "billing.manage (オーナーまたは管理者または請求担当)"
        ],
        "x-oneend-mcp-tool": "set_spend_limit",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "spend_limit_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "上限です。nullならなしです。"
                  },
                  "webhook_url": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "通知を受けるhttpsアドレスです。空文字列なら削除します。"
                  }
                },
                "required": [
                  "spend_limit_minor"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/billing": {
      "get": {
        "operationId": "get_billing",
        "summary": "請求と使用量",
        "description": "1か月分の請求（項目ごとの使用量、無料枠、料金）と日別の使用量です。periodが空なら今月（UTC）です。金額は currency の最小単位です（KRW はウォン、USD はセント）。included は今月実際に使ったプランの無料枠（変更日までの日数で按分）、list_included は Pro の無料枠です。amount_minor・total_minor は請求される金額、list_amount_minor・list_total_minor は定価です。billing_exempt が true の組織（運営会社自身のアカウント）は請求額が0で、支払いを理由に止まりません。定価は Pro プランの料金表によるものです。カードとお支払い履歴はコンソールでのみ確認できます。オーナー、管理者、請求担当のメンバーだけが見られます。",
        "tags": [
          "billing"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "YYYY-MM"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "period": {},
                    "plan": {},
                    "period_start": {},
                    "period_end": {},
                    "currency": {},
                    "list_total_minor": {},
                    "billing_exempt": {},
                    "lines": {},
                    "usage": {},
                    "months": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "billing.manage (オーナーまたは管理者または請求担当)"
        ],
        "x-oneend-mcp-tool": "get_billing"
      }
    },
    "/projects/{ref}/audit": {
      "get": {
        "operationId": "get_audit_log",
        "summary": "監査ログ",
        "description": "tab=activityは組織で誰が何を変更したか、tab=accessは誰が個人情報にアクセスしたかです。新しい順に一度に最大200件まで返り、has_moreがtrueならoffsetを増やして再度呼び出してください。fromとtoはYYYY-MM-DD（韓国時間の日付）です。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "logs"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "tab",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "activity",
                "access"
              ],
              "description": "変更ならactivity、個人情報へのアクセスならaccessです。"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "最初の日付です。YYYY-MM-DD。"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "最後の日付です。YYYY-MM-DD。"
            }
          },
          {
            "name": "actor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "メールアドレスの一部です。"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "この語で始まる操作です。例: member"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "description": "取得する件数です。最大200件です。"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "読み飛ばす件数です。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "tab": {},
                    "total": {},
                    "has_more": {},
                    "records": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-permissions": [
          "audit.read (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "get_audit_log"
      }
    },
    "/projects/{ref}/signing": {
      "get": {
        "operationId": "get_jwt_signing",
        "summary": "トークンの署名",
        "description": "ログイントークンをHS256とES256のどちらで署名しているか、また当面まだ受け付ける古いキー（猶予期間中のキー）を表示します。",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "alg": {},
                    "keys": {},
                    "grace_hours": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "read",
        "x-oneend-mcp-tool": "get_jwt_signing"
      },
      "put": {
        "operationId": "set_jwt_signing",
        "summary": "トークンの署名の変更",
        "description": "ES256にすると、新しいログインは非対称鍵で署名され、ほかのサーバーが公開鍵（JWKS）でトークンを確認できます。すでに発行されたトークンは期限が切れるまで使えます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "alg": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "set_jwt_signing",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alg": {
                    "type": "string",
                    "enum": [
                      "HS256",
                      "ES256"
                    ],
                    "description": "HS256またはES256です。"
                  }
                },
                "required": [
                  "alg"
                ]
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/signing/rotate": {
      "post": {
        "operationId": "rotate_signing_key",
        "summary": "キーのローテーション",
        "description": "パブリッシャブルキーとシークレットキーに署名する新しいキーを作成します。古いキーはgrace_hours（0、1、24、168）の間まだ受け付けます。0（または空）にするとすぐに無効になります（漏えいした場合）。0のときは使っているアプリがすべて30秒以内に止まるため、confirm にプロジェクト名（list_projectsのname）をそのまま入れてください。アプリに入れたキーをすべて置き換える必要があるため、ユーザーがはっきり求めたときだけ使ってください。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "key_version": {},
                    "grace_hours": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "rotate_signing_key",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "grace_hours": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      24,
                      168
                    ],
                    "description": "古いキーをあと何時間受け付けるかです: 0、1、24、168のいずれか。"
                  },
                  "confirm": {
                    "type": "string",
                    "description": "grace_hoursが0または空のときだけ: プロジェクト名です。list_projectsのnameと完全に同じである必要があります。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects/{ref}/signing/keys/{kid}": {
      "delete": {
        "operationId": "retire_signing_key",
        "summary": "古いキーの終了",
        "description": "猶予期間中の古いキーを今すぐ終了します。kidはget_jwt_signingのkeysのうち、stateがrotatingのものです。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "keys"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "kid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "get_jwt_signingのkidです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ref": {},
                    "kid": {},
                    "retired": {},
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "retire_signing_key"
      }
    },
    "/projects/{ref}/domains/{hostname}/certificate": {
      "put": {
        "operationId": "upload_certificate",
        "summary": "証明書のアップロード",
        "description": "接続済みのドメインに独自のTLS証明書を使います。certificateはPEMのチェーン（サーバー証明書が先頭）、keyはPEMの秘密鍵です。ドメイン名が証明書に含まれている必要があります。1分以内に反映されます。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "hostname",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "接続済みのドメインです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "upload_certificate",
        "x-oneend-max-body-bytes": 262144,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "certificate": {
                    "type": "string",
                    "description": "PEMの証明書チェーンです。サーバー証明書が先頭です。"
                  },
                  "key": {
                    "type": "string",
                    "description": "PEMの秘密鍵です。"
                  }
                },
                "required": [
                  "certificate",
                  "key"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_certificate",
        "summary": "アップロードした証明書の削除",
        "description": "アップロードした証明書を削除し、自動発行の証明書に戻します。この操作はオーナーと管理者のみ行えます。",
        "tags": [
          "domains"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{20}$",
              "description": "プロジェクト識別子です。list_projectsで確認できます。"
            }
          },
          {
            "name": "hostname",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "接続済みのドメインです。"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功です。本文は結果の JSON です。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "note": {}
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        },
        "x-oneend-scope": "write",
        "x-oneend-permissions": [
          "project.admin (オーナーまたは管理者)"
        ],
        "x-oneend-mcp-tool": "remove_certificate"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "bwk_… personal access token, or an OAuth access token (ADR 0016)."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "responses": {
      "E400": {
        "description": "リクエストが正しくないか、操作が拒否されました。理由は error.message にあります。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E401": {
        "description": "トークンがないか、正しくないか、期限切れです。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E402": {
        "description": "402",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E403": {
        "description": "トークンのスコープ（read/write）や組織内のロールが足りないか、組織が二段階認証を求めています。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E404": {
        "description": "プロジェクトや対象が存在しないか、このトークンからは見えません。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E409": {
        "description": "今はできません。たとえばプロジェクトのデータベースをまだ作成中です。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E413": {
        "description": "本文がこのルートの上限を超えています。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E422": {
        "description": "422",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E429": {
        "description": "429",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E500": {
        "description": "サーバーが結果を読み戻せませんでした。しばらくしてからもう一度お試しください。",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E502": {
        "description": "502",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
