app-store-ratings
Analyze app ratings and review distributions from the App Store using numeric app ID or bundle ID. Provides total ratings and a star-level histogram for targeted market insights.
Instructions
Get ratings for an App Store app. Returns an object with:
ratings: Total number of ratings
histogram: Distribution of ratings by star level (1-5)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | No | Bundle ID (e.g., 'com.midasplayer.apps.candycrushsaga'). Either this or id must be provided. | |
| country | No | Country code to get ratings from (default: us) | us |
| id | No | Numeric App ID (e.g., 553834731). Either this or appId must be provided. |
Implementation Reference
- src/server.js:228-231 (handler)The handler function for the 'app-store-ratings' tool. It fetches ratings data from the App Store using the imported 'store' library (from '@jeromyfu/app-store-scraper') for the given app ID or bundle ID and country, then returns the data as JSON text content.async ({ id, appId, country }) => { const ratings = await store.ratings({ id, appId, country }); return { content: [{ type: "text", text: JSON.stringify(ratings) }] }; }
- src/server.js:223-227 (schema)Zod schema defining the input parameters for the 'app-store-ratings' tool: optional numeric app ID or string bundle ID (one required), and optional country code (defaults to 'us').{ id: z.number().optional().describe("Numeric App ID (e.g., 553834731). Either this or appId must be provided."), appId: z.string().optional().describe("Bundle ID (e.g., 'com.midasplayer.apps.candycrushsaga'). Either this or id must be provided."), country: z.string().default("us").describe("Country code to get ratings from (default: us)") },
- src/server.js:219-232 (registration)Registration of the 'app-store-ratings' tool on the McpServer instance, specifying the tool name, description, input schema, and inline handler function.server.tool("app-store-ratings", "Get ratings for an App Store app. Returns an object with:\n" + "- ratings: Total number of ratings\n" + "- histogram: Distribution of ratings by star level (1-5)", { id: z.number().optional().describe("Numeric App ID (e.g., 553834731). Either this or appId must be provided."), appId: z.string().optional().describe("Bundle ID (e.g., 'com.midasplayer.apps.candycrushsaga'). Either this or id must be provided."), country: z.string().default("us").describe("Country code to get ratings from (default: us)") }, async ({ id, appId, country }) => { const ratings = await store.ratings({ id, appId, country }); return { content: [{ type: "text", text: JSON.stringify(ratings) }] }; } );
- src/server.js:29-29 (helper)Import of the 'store' library from '@jeromyfu/app-store-scraper' used by the app-store-ratings handler to fetch App Store ratings data.import store from '@jeromyfu/app-store-scraper';