Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

get-google-reviews

Retrieve Google reviews for businesses using search terms, Place IDs, or CIDs to analyze customer feedback and ratings.

Instructions

Retrieve Google reviews for businesses or places.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordNoBusiness name or search term
cidNoGoogle Maps CID
placeIdNoGoogle Place ID
reviewsNoNumber of reviews to fetch
sortByNoSort orderrelevant
languageNoLanguage code (e.g., 'en')en
locationNoLocation contextLondon,England,United Kingdom

Implementation Reference

  • The asynchronous handler function for the 'get-google-reviews' tool. It validates required inputs, retrieves the API key, makes a POST request to the Dumpling AI backend endpoint '/api/v1/get-google-reviews' with the parameters, handles errors, and returns the response data as structured text content.
    async ({ keyword, cid, placeId, reviews, sortBy, language, location }) => {
      if (!keyword && !cid && !placeId)
        throw new Error("Either keyword, cid, or placeId is required");
      const apiKey = process.env.DUMPLING_API_KEY;
      if (!apiKey) throw new Error("DUMPLING_API_KEY not set");
      const response = await fetch(`${NWS_API_BASE}/api/v1/get-google-reviews`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${apiKey}`,
        },
        body: JSON.stringify({
          keyword,
          cid,
          placeId,
          reviews,
          sortBy,
          language,
          location,
        }),
      });
      if (!response.ok)
        throw new Error(`Failed: ${response.status} ${await response.text()}`);
      const data = await response.json();
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • Zod input schema for the 'get-google-reviews' tool, defining optional parameters like keyword, cid, placeId, number of reviews, sorting, language, and location with defaults and descriptions.
    {
      keyword: z.string().optional().describe("Business name or search term"),
      cid: z.string().optional().describe("Google Maps CID"),
      placeId: z.string().optional().describe("Google Place ID"),
      reviews: z
        .number()
        .optional()
        .default(10)
        .describe("Number of reviews to fetch"),
      sortBy: z
        .enum(["relevant", "newest", "highest_rating", "lowest_rating"])
        .optional()
        .default("relevant")
        .describe("Sort order"),
      language: z
        .string()
        .optional()
        .default("en")
        .describe("Language code (e.g., 'en')"),
      location: z
        .string()
        .optional()
        .default("London,England,United Kingdom")
        .describe("Location context"),
    },
  • src/index.ts:283-337 (registration)
    The server.tool() call that registers the 'get-google-reviews' MCP tool, specifying its name, description, input schema, and handler function.
    server.tool(
      "get-google-reviews",
      "Retrieve Google reviews for businesses or places.",
      {
        keyword: z.string().optional().describe("Business name or search term"),
        cid: z.string().optional().describe("Google Maps CID"),
        placeId: z.string().optional().describe("Google Place ID"),
        reviews: z
          .number()
          .optional()
          .default(10)
          .describe("Number of reviews to fetch"),
        sortBy: z
          .enum(["relevant", "newest", "highest_rating", "lowest_rating"])
          .optional()
          .default("relevant")
          .describe("Sort order"),
        language: z
          .string()
          .optional()
          .default("en")
          .describe("Language code (e.g., 'en')"),
        location: z
          .string()
          .optional()
          .default("London,England,United Kingdom")
          .describe("Location context"),
      },
      async ({ keyword, cid, placeId, reviews, sortBy, language, location }) => {
        if (!keyword && !cid && !placeId)
          throw new Error("Either keyword, cid, or placeId is required");
        const apiKey = process.env.DUMPLING_API_KEY;
        if (!apiKey) throw new Error("DUMPLING_API_KEY not set");
        const response = await fetch(`${NWS_API_BASE}/api/v1/get-google-reviews`, {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
            Authorization: `Bearer ${apiKey}`,
          },
          body: JSON.stringify({
            keyword,
            cid,
            placeId,
            reviews,
            sortBy,
            language,
            location,
          }),
        });
        if (!response.ok)
          throw new Error(`Failed: ${response.status} ${await response.text()}`);
        const data = await response.json();
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
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. While 'retrieve' implies a read operation, the description doesn't mention important behavioral aspects like rate limits, authentication requirements, data freshness, pagination, or error conditions. This leaves significant gaps for an agent to understand how to use this tool effectively.

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 a single, clear sentence that efficiently communicates the core purpose without unnecessary words. It's appropriately sized for a tool with good schema documentation and gets straight to the point with zero wasted text.

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 7 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (review format, fields included), doesn't mention authentication or rate limiting considerations, and provides no guidance on parameter combinations or error handling. The schema handles parameter documentation, but the description fails to address other critical contextual aspects.

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 description provides no parameter-specific information beyond what's already in the schema, which has 100% coverage with detailed descriptions for all 7 parameters. The baseline score of 3 reflects that the schema adequately documents parameters, but the description adds no additional semantic context about how parameters interact or which are most important.

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 verb ('retrieve') and resource ('Google reviews for businesses or places'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools like 'search-places' or 'search-maps' that might also return review-related information, preventing a perfect score.

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 sibling tools like 'search-places' and 'search-maps' available, there's no indication whether this tool is specialized for reviews only or how it differs from broader search tools that might include reviews.

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/DumplingAI/mcp-server-dumplingai'

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