Skip to main content
Glama
MiguelAlvRed

Store Scraper MCP

by MiguelAlvRed

gp_search

Search Google Play Store apps using keywords, country codes, and language filters to retrieve app listings and data.

Instructions

[Google Play] Search for apps

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termYesSearch term
countryNoTwo-letter country code (default: us)us
langNoLanguage code (default: en)en
numNoNumber of results (default: 250)

Implementation Reference

  • The main handler function for the 'gp_search' tool. It extracts parameters from args, validates the search term, builds the Google Play search URL using buildGPSearchUrl, fetches the HTML content, parses it using parseGPSearch, and returns the structured results as JSON or an error.
    async function handleGPSearch(args) {
      try {
        const {
          term,
          country = 'us',
          lang = 'en',
          num = 250,
        } = args;
    
        if (!term) {
          throw new Error('term is required');
        }
    
        const url = buildGPSearchUrl({ term, country, lang, num });
        const html = await fetchText(url);
        const result = parseGPSearch(html);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ error: error.message }, null, 2),
            },
          ],
          isError: true,
        };
      }
    }
  • The input schema definition for the 'gp_search' tool, specifying parameters like term (required), country, lang, and num with descriptions and defaults.
    {
      name: 'gp_search',
      description: '[Google Play] Search for apps',
      inputSchema: {
        type: 'object',
        properties: {
          term: {
            type: 'string',
            description: 'Search term',
          },
          country: {
            type: 'string',
            description: 'Two-letter country code (default: us)',
            default: 'us',
          },
          lang: {
            type: 'string',
            description: 'Language code (default: en)',
            default: 'en',
          },
          num: {
            type: 'number',
            description: 'Number of results (default: 250)',
            default: 250,
          },
        },
        required: ['term'],
      },
    },
  • The switch case in the CallToolRequestSchema handler that routes calls to the 'gp_search' tool to the handleGPSearch function.
    case 'gp_search':
      return await handleGPSearch(args);
  • The buildSearchUrl function (imported as buildGPSearchUrl) that constructs the Google Play search URL based on term, country, lang, and other parameters.
    export function buildSearchUrl(params) {
      const {
        term,
        country = 'us',
        lang = 'en',
        num = 250,
        fullDetail = false,
      } = params;
    
      const queryParams = new URLSearchParams({
        q: term,
        c: 'apps',
        gl: country,
        hl: lang,
      });
    
      return `${GOOGLE_PLAY_BASE}/store/search?${queryParams.toString()}`;
    }
  • The parseSearchResults function (imported as parseGPSearch) that wraps parseSearch to return structured results with results array and count for Google Play search HTML.
    export function parseSearchResults(html) {
      const apps = parseSearch(html);
      
      return {
        results: apps,
        count: apps.length,
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool searches for apps but doesn't mention whether this is a read-only operation, what the response format might be, any rate limits, authentication requirements, or potential side effects. For a search tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 with just two words ('Search for apps') and the domain context in brackets, making it front-loaded and efficient. Every element earns its place without unnecessary elaboration.

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?

Given the complexity of a search operation with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., app details, IDs, or full listings), how results are structured, or any limitations, leaving the agent with insufficient context for effective use.

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?

The input schema has 100% description coverage, with clear documentation for all four parameters (term, country, lang, num), including defaults. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3 where the 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 ('Search for apps') and the resource domain ('Google Play'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from sibling tools like 'search', 'gp_list', or 'gp_suggest', which might offer similar search functionality with different scopes or parameters.

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 sibling tools like 'search', 'gp_list', and 'gp_suggest' that might overlap in functionality, there's no indication of context, prerequisites, or exclusions to help an agent choose appropriately.

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