# appstore_prepare_version

> 準備中の App Store バージョンを作成または編集します。番号、ビルド、リリースの種類、段階的リリース、著作権、App Review に必要な情報を設定します。

Source: https://air.build/ja/docs/mcp-tools/appstore_prepare_version/

App Store 向けに準備中のバージョンを作成または編集します。対象は、バージョン番号、一緒に出すビルド、リリース方法（手動、承認後すぐ、または指定日。7 日間の段階的リリースも可）、著作権表示、App Review に必要な情報（連絡先、デモアカウント、メモ）です。変更されるのは送った入力だけです。

準備中のバージョンがない場合は新しく作成し、このとき `versionString` は必須です。準備中のバージョンがある場合、別の `versionString` を送るとその番号が変わります。ストア情報のテキストやスクリーンショットには触れず（[appstore_update_store_listing](https://air.build/ja/docs/mcp-tools/appstore_update_store_listing/) と [appstore_upload_screenshots](https://air.build/ja/docs/mcp-tools/appstore_upload_screenshots/) を参照）、提出もしません（[appstore_submit_for_review](https://air.build/ja/docs/mcp-tools/appstore_submit_for_review/) を参照）。

| 読み取り専用 | 破壊的 | 冪等 |
| --- | --- | --- |
| いいえ | いいえ | はい |

## 入力

| 入力 | 型 | 必須 | デフォルト | 内容 |
| --- | --- | --- | --- | --- |
| `teamId` | 文字列（UUID） | yes | — | チーム。[list_teams](https://air.build/ja/docs/mcp-tools/list_teams/) から取得します。 |
| `projectId` | 文字列（UUID） | これか `appId` | — | このアプリのプロジェクト。[list_projects](https://air.build/ja/docs/mcp-tools/list_projects/) から取得します。アプリを指定する通常の方法です。アプリは、プロジェクトがビルドする bundle ID を持つ App Store Connect 上のアプリです。両方を送った場合は `projectId` が使われます。 |
| `appId` | string | これか `projectId` | — | [appstore_list_apps](https://air.build/ja/docs/mcp-tools/appstore_list_apps/) から取得した App Store Connect のアプリ ID。どのプロジェクトもビルドしていないアプリに使います。 |
| `appleTeamId` | 文字列（UUID） | no | 接続済みのすべての Apple チーム | チームの Apple チームの 1 つ。[appstore_list_apple_teams](https://air.build/ja/docs/mcp-tools/appstore_list_apple_teams/) から取得します。`appId` と一緒に使うと、この Apple チームだけでアプリを探します。`projectId` を使う場合は不要です。プロジェクトのアプリで決まります。 |
| `platform` | 文字列：`IOS`、`MAC_OS`、`TV_OS`、`VISION_OS` | no | `IOS` | どのプラットフォームの App Store バージョンか。 |
| `versionString` | string | バージョンを作成する場合 | — | バージョン番号。例：`1.2.0`。 |
| `buildId` | string | no | — | このビルドを添付します。[appstore_list_builds](https://air.build/ja/docs/mcp-tools/appstore_list_builds/) から取得します。 |
| `buildNumber` | string | no | — | このビルド番号を持つ最新の期限内のビルドを添付します。例：`42`。 |
| `useLatestBuild` | boolean | no | — | このバージョン番号の最新の期限内のビルドを添付します。 |
| `release` | 文字列：`manual`、`afterApproval`、`scheduled` | no | — | 承認後にバージョンをどうリリースするか。`scheduled` には `scheduledDate` が必要です。 |
| `scheduledDate` | 文字列（ISO 8601 の日時） | `scheduled` の場合 | — | 最も早いリリース日時。例：`2026-11-01T09:00:00Z`。 |
| `phasedRelease` | boolean | no | — | true にすると、自動アップデートをオンにしている人へ 7 日間かけてアップデートを配信します。false にするとこれをオフにします。 |
| `copyright` | string | no | — | 例：`2026 Example Inc.` |
| `reviewContact` | オブジェクト：`firstName`、`lastName`、`phone`、`email`（文字列） | no | — | App Review の連絡先担当者。変更されるのは送ったフィールドだけです。 |
| `demoAccount` | オブジェクト `name`、`password`（どちらも必須）、または null | no | — | App Review が使えるサインイン情報。アプリにサインインが不要な場合は null。 |
| `reviewNotes` | 文字列、最大 4,000 文字 | no | — | App Review へのメモ。 |

すべてのツールが入力に対して行うチェックは [サーバーとサインイン](https://air.build/ja/docs/mcp-tools/server/#errors) にあります。

## 結果

JSON オブジェクト。テキストと `structuredContent` の両方で返します。

| フィールド | 内容 |
| --- | --- |
| `version` | 変更後のバージョン（フィールドは下記） |
| `review` | App Review に渡る情報。何も設定されていない場合は null：`contact`（`firstName`、`lastName`、`phone`、`email`）、`demoAccount`（`name` と、`"(set)"` とだけ表示される `password`。デモアカウントが不要な場合は null）、`notes` |

バージョンのフィールド：

| フィールド | 内容 |
| --- | --- |
| `versionId` | Apple がバージョンに付けた ID |
| `version` | バージョン番号。例：`1.2.0` |
| `state` | Apple 上のバージョンの状態。例：`PREPARE_FOR_SUBMISSION`、`WAITING_FOR_REVIEW`、`IN_REVIEW`、`PENDING_DEVELOPER_RELEASE`、`READY_FOR_SALE`、`REJECTED` |
| `releaseType` | `MANUAL`、`AFTER_APPROVAL`、`SCHEDULED`、または null |
| `scheduledRelease` | 日時指定リリースの最も早いリリース日、または null |
| `copyright` | 著作権表示、または null |
| `build` | 添付されたビルド（`buildId` と `buildNumber`）、または null |
| `phasedRelease` | 段階的リリース（`state`（`INACTIVE`、`ACTIVE`、`PAUSED`、`COMPLETE`）と `day`（7 日間のうち何日目か））、または null |
| `createdAt` | バージョンが作成された日時 |

```json
{
  "version": {
    "versionId": "00000000-0000-0000-0000-000000000000",
    "version": "1.2.0",
    "state": "PREPARE_FOR_SUBMISSION",
    "releaseType": "AFTER_APPROVAL",
    "scheduledRelease": null,
    "copyright": "2026 Example Inc.",
    "build": {
      "buildId": "00000000-0000-0000-0000-000000000000",
      "buildNumber": "42"
    },
    "phasedRelease": null,
    "createdAt": "2026-11-18T09:00:00Z"
  },
  "review": {
    "contact": {
      "firstName": "Alex",
      "lastName": "Doe",
      "phone": "+1 555 0100",
      "email": "review@example.com"
    },
    "demoAccount": null,
    "notes": "Notes"
  }
}
```

## エラー

どれもツールエラー（`isError: true`）として返ります。_斜体_ の語は、文中に入る実際の値を表します。すべてのツールが返す可能性のあるエラーは [サーバーとサインイン](https://air.build/ja/docs/mcp-tools/server/#errors) にあります。

| メッセージ | 発生する状況 | 対処 |
| --- | --- | --- |
| No version is being prepared: pass versionString to start one, e.g. 1.2.0. | 変更できるバージョンがなく、`versionString` も送られていない | `versionString` を送ってください |
| App Store Connect did not create the version. | Apple の応答に新しいバージョンが含まれていなかった | appstore_app_status で状態を確認してから、もう一度試してください |
| release must be manual, afterApproval or scheduled. | `release` がそれ以外の値 | 3 つのうちのどれかを送ってください |
| scheduledDate is required. | `release: "scheduled"` なのに `scheduledDate` がない | `scheduledDate` を送ってください |
| Build _number_ is _state_: only a processed build can be attached. | ビルドがまだ処理中、または処理に失敗した | 処理が終わるのを待つ（appstore_list_builds）か、別のビルドを選んでください |
| No build _number_ of version _version_ on App Store Connect. See appstore_list_builds. | このバージョンにその `buildNumber` を持つビルドがない | [appstore_list_builds](https://air.build/ja/docs/mcp-tools/appstore_list_builds/) で確認してください |
| No build of version _version_ has reached App Store Connect yet. ask in the Project's channel (send_message) for a TestFlight build. | `useLatestBuild` を指定したが、そのバージョン番号のビルドが存在しない | [send_message](https://air.build/ja/docs/mcp-tools/send_message/) で、プロジェクトのエージェントにビルドを依頼してください |
| No such build. | `buildId` に該当するビルドがない | [appstore_list_builds](https://air.build/ja/docs/mcp-tools/appstore_list_builds/) から `buildId` を取得してください |
| No build _number_ on App Store Connect. See appstore_list_builds. | その `buildNumber` を持つ期限内のビルドがない | [appstore_list_builds](https://air.build/ja/docs/mcp-tools/appstore_list_builds/) で確認してください |
| No build of this app has reached App Store Connect yet. Uploading one is the Team's Agents' work: ask in the Project's channel (send_message) for a TestFlight build. | アプリに期限内のビルドが 1 つもない | [send_message](https://air.build/ja/docs/mcp-tools/send_message/) で、プロジェクトのエージェントに TestFlight ビルドを依頼してください |
| Pass projectId, or appId from appstore_list_apps. | `projectId` も `appId` も送られていない | どちらかを送ってください |
| This Project has not been built for iOS yet, so it has no bundle id to find its app by. Ask the Team's Agent to build it, or pass appId. | プロジェクトが一度も iOS 向けにビルドされていない | プロジェクトのエージェントに iOS ビルドを依頼する（[send_message](https://air.build/ja/docs/mcp-tools/send_message/)）か、`appId` でアプリを指定してください |
| This Project has no app on App Store Connect yet. Create one with appstore_create_app (its bundle id is the Project's), or pass appId. | チームの接続済み Apple チームに、プロジェクトの bundle ID を持つアプリがない、または Apple チームが接続されていない | [appstore_create_app](https://air.build/ja/docs/mcp-tools/appstore_create_app/) でアプリを作成するか、`appId` で別のアプリを指定してください |
| No connected Apple team of this Team has that app. See appstore_list_apps. | `appId` が、接続済みのどの Apple チーム（または `appleTeamId`）のアプリでもない | [appstore_list_apps](https://air.build/ja/docs/mcp-tools/appstore_list_apps/) から ID を取得してください |
| platform must be IOS, MAC_OS, TV_OS or VISION_OS. | `platform` がそれ以外の値 | 4 つのうちのどれかを送ってください |
| App Store Connect: _Apple's sentence_ | Apple がリクエストを拒否した。続けて Apple 自身の文が最大 5 つ示され、Apple が項目を挙げている場合はその項目が角かっこで添えられます。App Store Connect で Apple の契約が同意待ちの場合も、このように拒否されます | Apple の文に従って対処してください。契約は、Apple Developer アカウントの Account Holder が App Store Connect（ビジネス › 契約）で同意します |
| App Store Connect answered _status_. Try again in a moment. | Apple が理由を示さずに拒否した | しばらくしてからもう一度試してください |

## 例

```json
{
  "name": "appstore_prepare_version",
  "arguments": {
    "teamId": "00000000-0000-0000-0000-000000000000",
    "projectId": "00000000-0000-0000-0000-000000000000",
    "versionString": "1.2.0",
    "useLatestBuild": true,
    "release": "afterApproval",
    "reviewContact": {
      "firstName": "Alex",
      "lastName": "Doe",
      "phone": "+1 555 0100",
      "email": "review@example.com"
    },
    "demoAccount": null
  }
}
```
