Skip to main content
Glama
MiguelAlvRed

Store Scraper MCP

by MiguelAlvRed

reviews

Retrieve app reviews from App Store and Google Play Store with pagination, sorting options, and country-specific data for analysis and monitoring.

Instructions

Get app reviews with pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoiTunes trackId of the app
appIdNoBundle ID of the app
countryNoTwo-letter country code (default: us)us
pageNoPage number (1-10, default: 1)
sortNoSort order: mostRecent or mostHelpfulmostRecent

Implementation Reference

  • Main execution handler for the 'reviews' tool. Builds reviews URL, fetches JSON RSS feed, parses reviews, and returns structured JSON response with pagination.
    async function handleReviews(args) {
      try {
        const {
          id,
          appId,
          country = 'us',
          page = 1,
          sort = 'mostRecent',
        } = args;
    
        if (!id && !appId) {
          throw new Error('Either id or appId must be provided');
        }
    
        const url = buildReviewsUrl({ id, appId, country, page, sort });
        const data = await fetchJSON(url);
        const reviews = parseReviews(data);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                page,
                reviews,
                count: reviews.length,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ error: error.message }, null, 2),
            },
          ],
          isError: true,
        };
      }
    }
  • Tool schema definition including name, description, and input schema for validation in ListTools response.
      name: 'reviews',
      description: 'Get app reviews with pagination',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'number',
            description: 'iTunes trackId of the app',
          },
          appId: {
            type: 'string',
            description: 'Bundle ID of the app',
          },
          country: {
            type: 'string',
            description: 'Two-letter country code (default: us)',
            default: 'us',
          },
          page: {
            type: 'number',
            description: 'Page number (1-10, default: 1)',
            default: 1,
          },
          sort: {
            type: 'string',
            description: 'Sort order: mostRecent or mostHelpful',
            default: 'mostRecent',
            enum: ['mostRecent', 'mostHelpful'],
          },
        },
      },
    },
  • Registration of the 'reviews' tool handler in the CallToolRequestSchema switch dispatcher.
    case 'reviews':
      return await handleReviews(args);
  • Helper parser that normalizes iTunes RSS feed reviews into a structured array of review objects.
    export function parseReviews(data) {
      if (!data || !data.feed || !data.feed.entry) {
        return [];
      }
    
      // First entry is app metadata, skip it
      const reviews = Array.isArray(data.feed.entry) 
        ? data.feed.entry.slice(1) 
        : [];
    
      return reviews.map(entry => {
        const author = entry.author?.[0] || entry.author || {};
        const rating = entry['im:rating']?.label || entry['im:rating'] || '0';
        const version = entry['im:version']?.label || entry['im:version'] || null;
        const title = entry.title?.label || entry.title || null;
        const content = entry.content?.label || entry.content?.[0]?.label || entry.content || null;
        const updated = entry.updated?.label || entry.updated || null;
        const id = entry.id?.label || entry.id || null;
    
        // Extract user ID from author URI if available
        let userId = null;
        let userUrl = null;
        if (author.uri?.label || author.uri) {
          const uri = author.uri.label || author.uri;
          const match = uri.match(/\/id(\d+)/);
          if (match) {
            userId = match[1];
            userUrl = uri;
          }
        }
    
        return {
          id: id || null,
          userName: author.name?.label || author.name || 'Anonymous',
          userUrl: userUrl || null,
          version: version,
          score: parseInt(rating, 10) || 0,
          title: title,
          text: content,
          updated: updated,
          url: entry.link?.[0]?.attributes?.href || entry.link?.attributes?.href || null,
        };
      });
    }
  • Helper function to construct the App Store reviews RSS feed URL with pagination and sorting.
    export function buildReviewsUrl(params) {
      const { id, appId, country = 'us', page = 1, sort = 'mostRecent' } = params;
      
      if (!id && !appId) {
        throw new Error('Either id or appId must be provided');
      }
      
      const appIdParam = id || appId;
      const pageNum = Math.min(page, 10); // Max 10 pages
      const sortParam = sort === 'mostHelpful' ? 'mostHelpful' : 'mostRecent';
      
      return `${ITUNES_BASE}/${country}/rss/customerreviews/page=${pageNum}/id=${appIdParam}/sortby=${sortParam}/json`;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. While 'Get' implies a read operation, it doesn't disclose important behavioral aspects like rate limits, authentication requirements, error conditions, or what the paginated response structure looks like. The mention of 'pagination' is helpful but insufficient for full transparency.

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?

The description is extremely concise at just 5 words, front-loading the core purpose without any unnecessary elaboration. Every word earns its place, making it efficient for quick understanding while covering the essential functionality.

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 5 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, how pagination works in practice, or provide context about the review data structure. The agent would need to guess about the response format and operational details.

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?

With 100% schema description coverage, the schema already documents all 5 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, so it meets the baseline of 3 but doesn't provide extra value through examples, edge cases, or clarification of parameter interactions.

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 tool's purpose as 'Get app reviews with pagination', which specifies the action (get), resource (app reviews), and a key feature (pagination). It distinguishes from some siblings like 'ratings' or 'privacy', but doesn't explicitly differentiate from 'gp_reviews' which appears to be a similar tool.

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?

The description provides no guidance on when to use this tool versus alternatives. With multiple review-related tools in the sibling list (reviews, gp_reviews, ratings), there's no indication of which one to choose for different scenarios, nor any mention of prerequisites or constraints.

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