Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

extract

Extract structured data from web pages by defining a schema and providing a URL, using AI to process and organize information from online sources.

Instructions

Extract structured data from web pages using AI-powered instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to extract from
schemaYesSchema defining the data to extract

Implementation Reference

  • The handler function for the 'extract' tool. It fetches the API key, makes a POST request to the Dumpling AI extract endpoint with the url and schema, handles errors, and returns the JSON response as text content.
    async ({ url, schema }) => {
      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/extract`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${apiKey}`,
        },
        body: JSON.stringify({ url, schema }),
      });
      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 for the 'extract' tool using Zod, defining 'url' as a URL string and 'schema' as a record of any type.
    {
      url: z.string().url().describe("URL to extract from"),
      schema: z.record(z.any()).describe("Schema defining the data to extract"),
    },
  • src/index.ts:415-439 (registration)
    Full registration of the 'extract' tool on the MCP server, including name, description, schema, and inline handler.
    // Tool to extract structured data from web pages
    server.tool(
      "extract",
      "Extract structured data from web pages using AI-powered instructions.",
      {
        url: z.string().url().describe("URL to extract from"),
        schema: z.record(z.any()).describe("Schema defining the data to extract"),
      },
      async ({ url, schema }) => {
        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/extract`, {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
            Authorization: `Bearer ${apiKey}`,
          },
          body: JSON.stringify({ url, schema }),
        });
        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 the full burden of behavioral disclosure. It mentions 'AI-powered instructions' but doesn't elaborate on how this affects behavior—such as potential latency, accuracy, rate limits, or authentication needs. For a tool that likely involves external API calls or processing, this lack of detail is a significant gap.

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 a single, efficient sentence: 'Extract structured data from web pages using AI-powered instructions.' It's front-loaded with the core purpose and avoids unnecessary words, making it highly concise and well-structured.

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 (AI-powered extraction from web pages), lack of annotations, and no output schema, the description is insufficient. It doesn't cover behavioral aspects like error handling, output format, or limitations, leaving the agent with incomplete context for effective use.

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?

The input schema has 100% description coverage, clearly documenting both parameters ('url' and 'schema'). The description adds minimal value beyond this, as it doesn't explain the format or examples for the 'schema' parameter or provide additional context. With high schema coverage, the baseline score of 3 is appropriate.

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: 'Extract structured data from web pages using AI-powered instructions.' It specifies the verb ('extract'), resource ('structured data from web pages'), and method ('AI-powered instructions'). However, it doesn't explicitly distinguish this tool from sibling tools like 'scrape' or 'crawl', which might have overlapping functionality, so it doesn't reach the highest score.

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 siblings like 'scrape' and 'crawl' that might handle similar web data extraction tasks, there's no indication of specific use cases, prerequisites, or exclusions. This leaves the agent without clear direction on tool selection.

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