Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

extract-audio

Extract structured data from audio files using a prompt. Convert spoken content into organized information for analysis and processing.

Instructions

Extract structured data from audio files based on a prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputMethodYesInput method
audioYesURL or base64-encoded audio
promptYesExtraction prompt
jsonModeNoReturn in JSON format

Implementation Reference

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