Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

extract-video

Extract structured data from videos using prompts to analyze content, convert video information into organized formats, and process video inputs via URLs or base64 encoding.

Instructions

Extract structured data from videos based on a prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputMethodYesInput method
videoYesURL or base64-encoded video
promptYesExtraction prompt
jsonModeNoReturn in JSON format

Implementation Reference

  • The handler function for the 'extract-video' tool. It proxies the request to an external API endpoint at `${NWS_API_BASE}/api/v1/extract-video`, passing inputMethod, video URL/base64, prompt, and jsonMode. Returns the API response as text content.
    async ({ inputMethod, video, prompt, jsonMode }) => { 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-video`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}`, }, body: JSON.stringify({ inputMethod, video, prompt, jsonMode, requestSource: "mcp", }), }); 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 validation for the 'extract-video' tool using Zod schemas for parameters: inputMethod (url/base64), video (string), prompt (string), jsonMode (optional boolean).
    { inputMethod: z.enum(["url", "base64"]).describe("Input method"), video: z.string().describe("URL or base64-encoded video"), prompt: z.string().describe("Extraction prompt"), jsonMode: z.boolean().optional().describe("Return in JSON format"), },
  • src/index.ts:760-791 (registration)
    Registration of the 'extract-video' tool on the MCP server using server.tool(), including name, description, input schema, and inline handler function.
    server.tool( "extract-video", "Extract structured data from videos based on a prompt.", { inputMethod: z.enum(["url", "base64"]).describe("Input method"), video: z.string().describe("URL or base64-encoded video"), prompt: z.string().describe("Extraction prompt"), jsonMode: z.boolean().optional().describe("Return in JSON format"), }, async ({ inputMethod, video, prompt, jsonMode }) => { 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-video`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}`, }, body: JSON.stringify({ inputMethod, video, prompt, jsonMode, requestSource: "mcp", }), }); 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