create_app_store_version
Create a new App Store version for iOS, macOS, tvOS, or visionOS apps by specifying version details, platform, and release settings.
Instructions
Create a new app store version for an app
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | The ID of the app | |
| platform | Yes | The platform for this version | |
| versionString | Yes | Version string in format X.Y or X.Y.Z (e.g., '1.0' or '1.0.0') | |
| copyright | No | Copyright text for this version (optional) | |
| releaseType | No | How the app should be released | |
| earliestReleaseDate | No | Earliest release date in ISO 8601 format (required when releaseType is SCHEDULED) | |
| buildId | No | ID of the build to associate with this version (optional) |
Implementation Reference
- src/handlers/localizations.ts:118-189 (handler)The handler function that implements the core logic for creating a new App Store version by making a POST request to the App Store Connect API.async createAppStoreVersion(args: { appId: string; platform: 'IOS' | 'MAC_OS' | 'TV_OS' | 'VISION_OS'; versionString: string; copyright?: string; releaseType?: 'MANUAL' | 'AFTER_APPROVAL' | 'SCHEDULED'; earliestReleaseDate?: string; buildId?: string; }): Promise<AppStoreVersionResponse> { const { appId, platform, versionString, copyright, releaseType, earliestReleaseDate, buildId } = args; validateRequired(args, ['appId', 'platform', 'versionString']); // Validate version string format const versionRegex = /^\d+\.\d+(\.\d+)?$/; if (!versionRegex.test(versionString)) { throw new Error('Version string must be in format X.Y or X.Y.Z (e.g., 1.0 or 1.0.0)'); } // Validate release date if provided if (earliestReleaseDate) { const date = new Date(earliestReleaseDate); if (isNaN(date.getTime())) { throw new Error('Invalid release date format. Use ISO 8601 format (e.g., 2024-01-01T00:00:00Z)'); } if (releaseType !== 'SCHEDULED') { throw new Error('earliestReleaseDate can only be set when releaseType is SCHEDULED'); } } const requestData: AppStoreVersionCreateRequest = { data: { type: 'appStoreVersions', attributes: { platform, versionString, ...(copyright && { copyright }), ...(releaseType && { releaseType }), ...(earliestReleaseDate && { earliestReleaseDate }) }, relationships: { app: { data: { type: 'apps', id: appId } }, ...(buildId && { build: { data: { type: 'builds', id: buildId } } }) } } }; return this.client.post<AppStoreVersionResponse>( '/appStoreVersions', requestData ); }
- src/index.ts:310-348 (schema)The JSON schema defining the input parameters for the create_app_store_version tool, including required fields and validation rules.name: "create_app_store_version", description: "Create a new app store version for an app", inputSchema: { type: "object", properties: { appId: { type: "string", description: "The ID of the app" }, platform: { type: "string", description: "The platform for this version", enum: ["IOS", "MAC_OS", "TV_OS", "VISION_OS"] }, versionString: { type: "string", description: "Version string in format X.Y or X.Y.Z (e.g., '1.0' or '1.0.0')" }, copyright: { type: "string", description: "Copyright text for this version (optional)" }, releaseType: { type: "string", description: "How the app should be released", enum: ["MANUAL", "AFTER_APPROVAL", "SCHEDULED"] }, earliestReleaseDate: { type: "string", description: "Earliest release date in ISO 8601 format (required when releaseType is SCHEDULED)" }, buildId: { type: "string", description: "ID of the build to associate with this version (optional)" } }, required: ["appId", "platform", "versionString"] } },
- src/index.ts:1348-1349 (registration)The switch case in the MCP tool call handler that dispatches calls to the createAppStoreVersion method on the LocalizationHandlers instance.case "create_app_store_version": return { toolResult: await this.localizationHandlers.createAppStoreVersion(args as any) };