Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

get-google-reviews

Retrieve Google reviews for businesses or places by providing search terms, CID, or Place ID. Specify the number of reviews, sort order, language, and location for tailored results.

Instructions

Retrieve Google reviews for businesses or places.

Input Schema

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

Implementation Reference

  • The handler function for the 'get-google-reviews' tool, which proxies requests to the Dumpling API to fetch Google reviews based on provided parameters.
    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) }] }; }
  • Input schema definition using Zod for validating parameters like keyword, cid, placeId, etc., for the 'get-google-reviews' tool.
    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 registration call that defines and registers the 'get-google-reviews' tool with its name, description, schema, and handler.
    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