google_create_iap
Create managed in-app products for Android apps in Google Play Console. Define product details, pricing, and status to monetize your application.
Instructions
Create a new in-app product (managed product)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| packageName | Yes | Android package name | |
| sku | Yes | Product SKU (unique identifier) | |
| defaultLanguage | Yes | Default language (e.g. en-US) | |
| defaultTitle | Yes | Default product title | |
| defaultDescription | Yes | Default product description | |
| status | No | active | |
| purchaseType | No | managedUser | |
| defaultPriceCurrencyCode | Yes | Currency code (e.g. USD) | |
| defaultPriceMicros | Yes | Price in micros (e.g. 990000 for $0.99) |
Implementation Reference
- src/google/tools.ts:496-513 (handler)The handler function for the google_create_iap tool which calls the client's createInAppProduct method.
handler: async (client, args) => { return client.createInAppProduct(args.packageName, { sku: args.sku, status: args.status, purchaseType: args.purchaseType, defaultLanguage: args.defaultLanguage, listings: { [args.defaultLanguage]: { title: args.defaultTitle, description: args.defaultDescription, }, }, defaultPrice: { priceMicros: args.defaultPriceMicros, currency: args.defaultPriceCurrencyCode, }, }); }, - src/google/tools.ts:485-495 (schema)The schema definition for the google_create_iap tool input arguments.
schema: z.object({ packageName: z.string().describe('Android package name'), sku: z.string().describe('Product SKU (unique identifier)'), defaultLanguage: z.string().describe('Default language (e.g. en-US)'), defaultTitle: z.string().describe('Default product title'), defaultDescription: z.string().describe('Default product description'), status: z.enum(['active', 'inactive']).default('active'), purchaseType: z.enum(['managedUser', 'subscription']).default('managedUser'), defaultPriceCurrencyCode: z.string().describe('Currency code (e.g. USD)'), defaultPriceMicros: z.string().describe('Price in micros (e.g. 990000 for $0.99)'), }), - src/google/tools.ts:623-623 (registration)Registration of the createInAppProduct tool within the tools list.
listInAppProducts, getInAppProduct, createInAppProduct, updateInAppProduct, deleteInAppProduct, - src/google/client.ts:257-263 (handler)The underlying client implementation of createInAppProduct that makes the API request to the Google Play Developer API.
async createInAppProduct(packageName: string, product: androidpublisher_v3.Schema$InAppProduct) { const res = await this.publisher.inappproducts.insert({ packageName, requestBody: product, }); return res.data; }