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) }] }; } );

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