Skip to main content
Glama

search_app

Search for apps on iOS and Android app stores by term, platform, and region to find relevant applications and their details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termYesThe search term to look up (e.g., 'panda', 'spotify', 'photo editor'). This is required.
platformYesThe platform to search on ('ios' for Apple App Store, 'android' for Google Play Store).
numNoNumber of results to return (1-250, default 10). For Android max is 250, for iOS typically defaults to 50.
countryNoTwo-letter country code for the App Store/Play Store region (e.g., 'us', 'de', 'gb'). Affects ranking and availability. Default 'us'.us

Implementation Reference

  • The core handler function for the 'search_app' tool. It takes search parameters, queries the appropriate store API (Google Play via gplay or App Store via app-store-scraper), standardizes the app results across platforms, and returns formatted JSON with search results or error information.
    async ({ term, platform, num, country }) => { try { let results; if (platform === "android") { // Search on Google Play Store results = await memoizedGplay.search({ term, num, country, fullDetail: false }); // Standardize the results results = results.map(app => ({ id: app.appId, appId: app.appId, title: app.title, developer: app.developer, developerId: app.developerId, icon: app.icon, score: app.score, scoreText: app.scoreText, price: app.price, free: app.free, platform: "android", url: app.url })); } else { // Search on Apple App Store results = await memoizedAppStore.search({ term, num, country }); // Standardize the results results = results.map(app => ({ id: app.id.toString(), appId: app.appId, title: app.title, developer: app.developer, developerId: app.developerId, icon: app.icon, score: app.score, price: app.price, free: app.free === true, platform: "ios", url: app.url })); } return { content: [{ type: "text", text: JSON.stringify({ query: term, platform, results, count: results.length }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: error.message, query: term, platform }, null, 2) }], isError: true }; } }
  • Zod input schema defining parameters for the search_app tool: term (required string), platform (ios/android), num (optional number 1-250 default 10), country (optional 2-letter code default 'us'). Validates and types tool arguments.
    { term: z.string().describe("The search term to look up (e.g., 'panda', 'spotify', 'photo editor'). This is required."), platform: z.enum(["ios", "android"]).describe("The platform to search on ('ios' for Apple App Store, 'android' for Google Play Store)."), num: z.number().min(1).max(250).optional().default(10).describe("Number of results to return (1-250, default 10). For Android max is 250, for iOS typically defaults to 50."), country: z.string().length(2).optional().default("us").describe("Two-letter country code for the App Store/Play Store region (e.g., 'us', 'de', 'gb'). Affects ranking and availability. Default 'us'.") },
  • server.js:58-143 (registration)
    The registration of the 'search_app' tool on the McpServer instance using server.tool(name, inputSchema, handlerCallback). This adds the tool to the MCP server's capabilities.
    server.tool( "search_app", { term: z.string().describe("The search term to look up (e.g., 'panda', 'spotify', 'photo editor'). This is required."), platform: z.enum(["ios", "android"]).describe("The platform to search on ('ios' for Apple App Store, 'android' for Google Play Store)."), num: z.number().min(1).max(250).optional().default(10).describe("Number of results to return (1-250, default 10). For Android max is 250, for iOS typically defaults to 50."), country: z.string().length(2).optional().default("us").describe("Two-letter country code for the App Store/Play Store region (e.g., 'us', 'de', 'gb'). Affects ranking and availability. Default 'us'.") }, async ({ term, platform, num, country }) => { try { let results; if (platform === "android") { // Search on Google Play Store results = await memoizedGplay.search({ term, num, country, fullDetail: false }); // Standardize the results results = results.map(app => ({ id: app.appId, appId: app.appId, title: app.title, developer: app.developer, developerId: app.developerId, icon: app.icon, score: app.score, scoreText: app.scoreText, price: app.price, free: app.free, platform: "android", url: app.url })); } else { // Search on Apple App Store results = await memoizedAppStore.search({ term, num, country }); // Standardize the results results = results.map(app => ({ id: app.id.toString(), appId: app.appId, title: app.title, developer: app.developer, developerId: app.developerId, icon: app.icon, score: app.score, price: app.price, free: app.free === true, platform: "ios", url: app.url })); } return { content: [{ type: "text", text: JSON.stringify({ query: term, platform, results, count: results.length }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: error.message, query: term, platform }, null, 2) }], isError: true }; } } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appreply-co/mcp-appstore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server