Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

search-places

Find detailed business information by searching for places using queries, location, country, language, and pagination. Integrates with Dumpling AI for comprehensive data access.

Instructions

Search for places with detailed business information.

Input Schema

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

Implementation Reference

  • Handler function that proxies the request to the external Dumpling AI API endpoint for searching places, authenticates with 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 schema defining the input parameters for the search-places tool: query (required), and optional country, location, language, page.
    { 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)
    Full registration of the 'search-places' MCP tool using server.tool, 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