Skip to main content
Glama
MiguelAlvRed

Store Scraper MCP

by MiguelAlvRed

list

Retrieve app rankings from app stores, including top free, paid, and grossing charts by country and genre.

Instructions

Get app rankings (top free, paid, or grossing)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chartNoChart type: topfreeapplications, toppaidapplications, or topgrossingapplicationstopfreeapplications
countryNoTwo-letter country code (default: us)us
genreNoGenre ID or "all" (default: all)all
limitNoNumber of results (default: 200)

Implementation Reference

  • Core handler function for the 'list' MCP tool. Fetches App Store ranking data via RSS/JSON endpoints and parses into structured app results.
    /**
     * List tool - Get app rankings (top free, paid, grossing)
     */
    async function handleList(args) {
      try {
        const {
          chart = 'topfreeapplications',
          category = 'all',
          country = 'us',
          genre = 'all',
          limit = 200,
        } = args;
    
        const url = buildListUrl({ chart, category, country, genre, limit });
        const data = await fetchJSON(url);
        // Use parseList for RSS feed format, fallback to parseApps for JSON format
        const apps = data.feed ? parseList(data) : parseApps(data);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                chart,
                country,
                results: apps,
                count: apps.length,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ error: error.message }, null, 2),
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema for the 'list' tool, defining parameters for chart type, country, genre, and limit with types, descriptions, defaults, and enums.
    inputSchema: {
      type: 'object',
      properties: {
        chart: {
          type: 'string',
          description: 'Chart type: topfreeapplications, toppaidapplications, or topgrossingapplications',
          default: 'topfreeapplications',
          enum: ['topfreeapplications', 'toppaidapplications', 'topgrossingapplications'],
        },
        country: {
          type: 'string',
          description: 'Two-letter country code (default: us)',
          default: 'us',
        },
        genre: {
          type: 'string',
          description: 'Genre ID or "all" (default: all)',
          default: 'all',
        },
        limit: {
          type: 'number',
          description: 'Number of results (default: 200)',
          default: 200,
        },
      },
    },
  • src/server.js:998-1026 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name 'list', description, and input schema for MCP tool discovery.
      name: 'list',
      description: 'Get app rankings (top free, paid, or grossing)',
      inputSchema: {
        type: 'object',
        properties: {
          chart: {
            type: 'string',
            description: 'Chart type: topfreeapplications, toppaidapplications, or topgrossingapplications',
            default: 'topfreeapplications',
            enum: ['topfreeapplications', 'toppaidapplications', 'topgrossingapplications'],
          },
          country: {
            type: 'string',
            description: 'Two-letter country code (default: us)',
            default: 'us',
          },
          genre: {
            type: 'string',
            description: 'Genre ID or "all" (default: all)',
            default: 'all',
          },
          limit: {
            type: 'number',
            description: 'Number of results (default: 200)',
            default: 200,
          },
        },
      },
    },
  • Dispatch registration in CallToolRequestSchema handler's switch statement, routing 'list' tool invocations to the handleList function.
    case 'list':
      return await handleList(args);
  • Helper function parseList that processes the raw RSS/JSON data from App Store rankings into an array of normalized app objects.
    export function parseList(data) {
      if (!data || !data.feed) {
        return [];
      }
    
      const apps = [];
    
      try {
        // RSS feed format has entries in feed.entry
        if (data.feed.entry && Array.isArray(data.feed.entry)) {
          for (const entry of data.feed.entry) {
            // Convert RSS entry to app format
            const app = {
              trackId: extractId(entry),
              bundleId: extractBundleId(entry),
              trackName: extractTitle(entry),
              artistName: extractArtist(entry),
              artistId: extractArtistId(entry),
              description: extractDescription(entry),
              price: extractPrice(entry),
              currency: 'USD',
              averageUserRating: extractRating(entry),
              userRatingCount: extractRatingCount(entry),
              artworkUrl100: extractIcon(entry),
              artworkUrl512: extractIcon(entry),
              screenshotUrls: extractScreenshots(entry),
              primaryGenreName: extractCategory(entry),
              releaseDate: extractReleaseDate(entry),
              kind: 'software',
            };
    
            // Use parseApp to normalize
            const lookupData = { results: [app] };
            const normalizedApp = parseApp(lookupData);
            if (normalizedApp) {
              apps.push(normalizedApp);
            }
          }
        }
      } catch (error) {
        console.error('Error parsing App Store list:', error);
      }
    
      return apps;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states what it does, not how it behaves. It doesn't mention whether this is a read-only operation, potential rate limits, authentication needs, error conditions, or response format. The agent must infer behavior from the name 'list' and description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise single sentence with zero waste. Every word earns its place by specifying the action, resource, and key parameter options without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the rankings include (e.g., app names, ratings, rankings), how results are structured, or any behavioral aspects. The agent lacks context about what to expect from this operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are fully documented in the schema. The description adds no additional parameter information beyond implying the 'chart' parameter options, which are already covered by the enum. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('app rankings') with specific categories (top free, paid, or grossing). It distinguishes from siblings like 'search' or 'reviews' by focusing on chart rankings, but doesn't explicitly differentiate from 'gp_list' which might serve a similar purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'search' or 'gp_list'. The description implies it's for retrieving chart data but doesn't specify use cases, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/MiguelAlvRed/mobile-store-scraper-mcp'

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