Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

generate-ai-image

Convert text prompts into AI-generated images using customizable models, aspect ratios, output formats, and quality settings. Ideal for visual content creation.

Instructions

Generate AI images from text prompts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesModel-specific parameters
modelYesModel to use for generation

Implementation Reference

  • The handler function that executes the tool logic by proxying a POST request to the external Dumpling AI API endpoint for generating AI images from text prompts using specified model and parameters.
    async ({ model, input }) => { 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/generate-ai-image`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}`, }, body: JSON.stringify({ model, input }), }); 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 'generate-ai-image' tool: 'model' string and 'input' object containing prompt, seed, num_outputs, aspect_ratio, output_format, output_quality, num_inference_steps, and guidance scale.
    model: z.string().describe("Model to use for generation"), input: z .object({ prompt: z.string().describe("Text prompt"), seed: z.number().optional().describe("Random seed"), num_outputs: z.number().optional().describe("Number of images"), aspect_ratio: z.string().optional().describe("Aspect ratio"), output_format: z.string().optional().describe("Output format"), output_quality: z.number().optional().describe("Output quality"), num_inference_steps: z.number().optional().describe("Inference steps"), guidance: z.number().optional().describe("Guidance scale"), }) .describe("Model-specific parameters"), },
  • src/index.ts:952-953 (registration)
    Registration of the 'generate-ai-image' tool on the MCP server using server.tool(), specifying name, description, input schema, and handler function.
    server.tool( "generate-ai-image",

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