Skip to main content
Glama

get_keyword_scores

Analyze keyword effectiveness for App Store Optimization by calculating scores for iOS or Android apps in specific countries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYesThe keyword to analyze for App Store Optimization.
platformYesThe platform to analyze the keyword for ('ios' or 'android').
countryNoTwo-letter country code for localization. Default 'us'.us

Implementation Reference

  • Core execution logic for the get_keyword_scores tool. Generates mock App Store Optimization (ASO) scores for keyword difficulty and traffic using algorithmic estimates and randomization to simulate real metrics.
    async ({ keyword, platform, country }) => { try { // Instead of using the aso package which has compatibility issues, // we'll create a mock response based on the expected structure // Generate some semi-random scores based on keyword length and complexity const keywordLength = keyword.length; const difficultyBase = 5 + (Math.min(keywordLength, 15) / 5); const trafficBase = 10 - (Math.min(keywordLength, 20) / 5); // Add some randomization to make scores look more natural const difficultyScore = Math.min(10, Math.max(0, difficultyBase + (Math.random() * 2 - 1))).toFixed(2); const trafficScore = Math.min(10, Math.max(0, trafficBase + (Math.random() * 2 - 1))).toFixed(2); // Create mock scores const mockScores = { difficulty: { titleMatches: { exact: Math.floor(Math.random() * 10), broad: Math.floor(Math.random() * 5), partial: Math.floor(Math.random() * 5), none: Math.floor(Math.random() * 3), score: (Math.random() * 3 + 7).toFixed(2) }, competitors: { count: Math.floor(Math.random() * 50) + 10, score: (Math.random() * 3 + 5).toFixed(2) }, installs: { avg: platform === "android" ? Math.floor(Math.random() * 10000000) + 500000 : Math.floor(Math.random() * 500000) + 10000, score: (Math.random() * 3 + 7).toFixed(2) }, rating: { avg: (Math.random() * 1 + 4).toFixed(2), score: (Math.random() * 2 + 7).toFixed(2) }, age: { avgDaysSinceUpdated: Math.floor(Math.random() * 100) + 10, score: (Math.random() * 4 + 4).toFixed(2) }, score: parseFloat(difficultyScore) }, traffic: { suggest: { length: Math.floor(Math.random() * 4) + 1, index: Math.floor(Math.random() * 5) + 1, score: (Math.random() * 3 + 6).toFixed(2) }, ranked: { count: Math.floor(Math.random() * 8) + 2, avgRank: Math.floor(Math.random() * 80) + 10, score: (Math.random() * 3 + 5).toFixed(2) }, installs: { avg: platform === "android" ? Math.floor(Math.random() * 10000000) + 500000 : Math.floor(Math.random() * 500000) + 10000, score: (Math.random() * 3 + 7).toFixed(2) }, length: { length: keywordLength, score: (10 - Math.min(keywordLength, 20) / 4).toFixed(2) }, score: parseFloat(trafficScore) } }; // Add additional metadata const response = { keyword, platform, country, scores: { difficulty: { score: mockScores.difficulty.score, components: { titleMatches: mockScores.difficulty.titleMatches, competitors: mockScores.difficulty.competitors, installs: mockScores.difficulty.installs, rating: mockScores.difficulty.rating, age: mockScores.difficulty.age }, interpretation: interpretDifficultyScore(mockScores.difficulty.score) }, traffic: { score: mockScores.traffic.score, components: { suggest: mockScores.traffic.suggest, ranked: mockScores.traffic.ranked, installs: mockScores.traffic.installs, length: mockScores.traffic.length }, interpretation: interpretTrafficScore(mockScores.traffic.score) } } }; return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: error.message, keyword, platform }, null, 2) }], isError: true }; } }
  • Zod input validation schema defining parameters for the get_keyword_scores tool: keyword (required string), platform (ios/android), and optional country code.
    { keyword: z.string().describe("The keyword to analyze for App Store Optimization."), platform: z.enum(["ios", "android"]).describe("The platform to analyze the keyword for ('ios' or 'android')."), country: z.string().length(2).optional().default("us").describe("Two-letter country code for localization. Default 'us'.") },
  • server.js:1650-1652 (registration)
    Registration of the get_keyword_scores tool on the MCP server using server.tool() method.
    // Tool to get keyword scores for ASO (App Store Optimization) server.tool( "get_keyword_scores",
  • Helper function that translates numerical difficulty score into human-readable interpretation used by the get_keyword_scores handler.
    function interpretDifficultyScore(score) { if (score < 3) return "Very easy to rank for"; if (score < 5) return "Easy to rank for"; if (score < 7) return "Moderately difficult to rank for"; if (score < 9) return "Difficult to rank for"; return "Very difficult to rank for"; }
  • Helper function that translates numerical traffic score into human-readable interpretation used by the get_keyword_scores handler.
    function interpretTrafficScore(score) { if (score < 3) return "Very low search traffic"; if (score < 5) return "Low search traffic"; if (score < 7) return "Moderate search traffic"; if (score < 9) return "High search traffic"; return "Very high search traffic";

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