Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

search

Perform Google web searches with customizable parameters like location, language, date range, and result scraping options to find specific information.

Instructions

Perform Google web searches with customizable parameters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
countryNoCountry code (e.g., 'us')
locationNoLocation name
languageNoLanguage code (e.g., 'en')
dateRangeNoTime range filter
pageNoPage number
scrapeResultsNoWhether to scrape results
numResultsToScrapeNoNumber of results to scrape
scrapeOptionsNoScraping options

Implementation Reference

  • The handler function that executes the 'search' tool logic by making a POST request to the DumplingAI API's /api/v1/search endpoint with the provided parameters and returning the JSON response.
    async ({
      query,
      country,
      location,
      language,
      dateRange,
      page,
      scrapeResults,
      numResultsToScrape,
      scrapeOptions,
    }) => {
      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`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${apiKey}`,
        },
        body: JSON.stringify({
          query,
          country,
          location,
          language,
          dateRange,
          page,
          scrapeResults,
          numResultsToScrape,
          scrapeOptions,
        }),
      });
      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' tool, including query, optional filters like country, location, dateRange, and scraping options.
    {
      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')"),
      dateRange: z
        .enum([
          "anyTime",
          "pastHour",
          "pastDay",
          "pastWeek",
          "pastMonth",
          "pastYear",
        ])
        .optional()
        .describe("Time range filter"),
      page: z.number().optional().describe("Page number"),
      scrapeResults: z.boolean().optional().describe("Whether to scrape results"),
      numResultsToScrape: z
        .number()
        .optional()
        .describe("Number of results to scrape"),
      scrapeOptions: z
        .object({
          format: z.enum(["markdown", "html", "screenshot"]).optional(),
          cleaned: z.boolean().optional(),
        })
        .optional()
        .describe("Scraping options"),
    },
  • src/index.ts:67-136 (registration)
    The server.tool call that registers the 'search' tool with the MCP server, specifying its name, description, input schema, and handler function.
    server.tool(
      "search",
      "Perform Google web searches with customizable parameters.",
      {
        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')"),
        dateRange: z
          .enum([
            "anyTime",
            "pastHour",
            "pastDay",
            "pastWeek",
            "pastMonth",
            "pastYear",
          ])
          .optional()
          .describe("Time range filter"),
        page: z.number().optional().describe("Page number"),
        scrapeResults: z.boolean().optional().describe("Whether to scrape results"),
        numResultsToScrape: z
          .number()
          .optional()
          .describe("Number of results to scrape"),
        scrapeOptions: z
          .object({
            format: z.enum(["markdown", "html", "screenshot"]).optional(),
            cleaned: z.boolean().optional(),
          })
          .optional()
          .describe("Scraping options"),
      },
      async ({
        query,
        country,
        location,
        language,
        dateRange,
        page,
        scrapeResults,
        numResultsToScrape,
        scrapeOptions,
      }) => {
        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`, {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
            Authorization: `Bearer ${apiKey}`,
          },
          body: JSON.stringify({
            query,
            country,
            location,
            language,
            dateRange,
            page,
            scrapeResults,
            numResultsToScrape,
            scrapeOptions,
          }),
        });
        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 full burden for behavioral disclosure. While 'Perform Google web searches' implies a read-only operation that queries external data, the description doesn't address important behavioral aspects like rate limits, authentication requirements, potential costs, error conditions, or what the output looks like. The mention of 'customizable parameters' hints at flexibility but doesn't describe the tool's actual behavior beyond the basic operation.

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 extremely concise at just one sentence: 'Perform Google web searches with customizable parameters.' It's front-loaded with the core purpose and wastes no words. Every element of the sentence contributes meaning - the action, target, and key capability are all efficiently communicated.

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?

Given the tool's complexity (9 parameters including nested objects), absence of annotations, and lack of output schema, the description is insufficiently complete. A search tool with scraping capabilities, location filtering, and date ranges needs more context about what results to expect, how scraping works, limitations, and how this differs from other search tools on the server. The single-sentence description doesn't provide enough information for an agent to understand the tool's full capabilities and constraints.

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?

Schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds minimal value beyond what's in the schema - it mentions 'customizable parameters' but doesn't provide additional context about how parameters interact or which combinations are most useful. With complete schema documentation, the baseline score of 3 is appropriate as the description doesn't significantly enhance parameter understanding.

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 tool's purpose: 'Perform Google web searches with customizable parameters.' It specifies the verb ('perform'), resource ('Google web searches'), and scope ('with customizable parameters'). However, it doesn't explicitly distinguish this from sibling tools like 'search-knowledge-base', 'search-maps', 'search-news', or 'search-places', which all perform different types of searches.

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 multiple sibling search tools (search-knowledge-base, search-maps, search-news, search-places), there's no indication that this is specifically for general web searches versus those specialized alternatives. The description mentions 'customizable parameters' but doesn't explain when those parameters are needed or what scenarios this tool is best suited for.

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