apple_create_iap
Create in-app purchases for iOS apps by defining product IDs, names, and types like consumable or subscription items.
Instructions
Create an in-app purchase
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | App ID | |
| name | Yes | IAP name | |
| productId | Yes | Product ID (e.g. com.example.app.coins100) | |
| inAppPurchaseType | Yes | IAP type |
Implementation Reference
- src/apple/tools.ts:1118-1132 (handler)The handler function that executes the creation of an in-app purchase.
handler: async (client, args) => { const { appId, ...attributes } = args; return client.request(`${V2_BASE}/inAppPurchases`, { method: 'POST', body: { data: { type: 'inAppPurchases', attributes, relationships: { app: { data: { type: 'apps', id: appId } }, }, }, }, }); }, - src/apple/tools.ts:1112-1117 (schema)The schema definition for the apple_create_iap tool.
schema: z.object({ appId: z.string().describe('App ID'), name: z.string().describe('IAP name'), productId: z.string().describe('Product ID (e.g. com.example.app.coins100)'), inAppPurchaseType: z.enum(['CONSUMABLE', 'NON_CONSUMABLE', 'NON_RENEWING_SUBSCRIPTION']).describe('IAP type'), }),