apple_update_category
Update an app's primary and secondary category on the App Store by providing the app ID and desired category IDs.
Instructions
Update app primary/secondary category
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appInfoId | Yes | AppInfo ID | |
| primaryCategoryId | No | Primary category ID (e.g. SOCIAL_NETWORKING) | |
| secondaryCategoryId | No | Secondary category ID |
Implementation Reference
- src/apple/tools.ts:54-79 (handler)The handler function for the apple_update_category tool. It updates an app's primary and/or secondary category by sending a PATCH request to /appInfos/{appInfoId} with the category relationships.
const updateAppInfoCategory: ToolDef = { name: 'apple_update_category', description: 'Update app primary/secondary category', schema: z.object({ appInfoId: z.string().describe('AppInfo ID'), primaryCategoryId: z.string().optional().describe('Primary category ID (e.g. SOCIAL_NETWORKING)'), secondaryCategoryId: z.string().optional().describe('Secondary category ID'), }), handler: async (client, args) => { const relationships: any = {}; if (args.primaryCategoryId) { relationships.primaryCategory = { data: { type: 'appCategories', id: args.primaryCategoryId }, }; } if (args.secondaryCategoryId) { relationships.secondaryCategory = { data: { type: 'appCategories', id: args.secondaryCategoryId }, }; } return client.request(`/appInfos/${args.appInfoId}`, { method: 'PATCH', body: { data: { type: 'appInfos', id: args.appInfoId, relationships } }, }); }, }; - src/apple/tools.ts:57-61 (schema)Zod schema defining the input parameters for apple_update_category: appInfoId (required), primaryCategoryId (optional), secondaryCategoryId (optional).
schema: z.object({ appInfoId: z.string().describe('AppInfo ID'), primaryCategoryId: z.string().optional().describe('Primary category ID (e.g. SOCIAL_NETWORKING)'), secondaryCategoryId: z.string().optional().describe('Secondary category ID'), }), - src/apple/tools.ts:1213-1215 (registration)The tool is registered in the appleTools array exported from src/apple/tools.ts, making it available for use in the MCP server.
export const appleTools: ToolDef[] = [ // App Management listApps, getApp, getAppInfo, updateAppInfoCategory,