Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

search-places

Find detailed business information by searching for places using location, country, and language parameters.

Instructions

Search for places with detailed business information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
countryNoCountry code (e.g., 'us')
locationNoLocation name
languageNoLanguage code (e.g., 'en')
pageNoPage number

Implementation Reference

  • The handler function for the 'search-places' tool. It proxies the request to the Dumpling AI API endpoint /api/v1/search-places, authenticates with DUMPLING_API_KEY, and returns the JSON response as text content.
    async ({ query, country, location, language, page }) => { 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/search-places`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}`, }, body: JSON.stringify({ query, country, location, language, page }), }); 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 'search-places' tool defining parameters: query (required string), and optional country, location, language (strings), page (number).
    { query: z.string().describe("Search query"), country: z.string().optional().describe("Country code (e.g., 'us')"), location: z.string().optional().describe("Location name"), language: z.string().optional().describe("Language code (e.g., 'en')"), page: z.number().optional().describe("Page number"), },
  • src/index.ts:207-233 (registration)
    The complete registration of the 'search-places' tool using McpServer.tool method, including name, description, input schema, and handler function.
    server.tool( "search-places", "Search for places with detailed business information.", { query: z.string().describe("Search query"), country: z.string().optional().describe("Country code (e.g., 'us')"), location: z.string().optional().describe("Location name"), language: z.string().optional().describe("Language code (e.g., 'en')"), page: z.number().optional().describe("Page number"), }, async ({ query, country, location, language, page }) => { 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/search-places`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}`, }, body: JSON.stringify({ query, country, location, language, page }), }); 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