display_generated_image
Display generated images in a new tab by providing the image URL. Simplifies visualization and integration for streamlined AI workflows on the MCP-Claude server.
Instructions
This function will display the generated image in a new tab
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| imageUrl | Yes | The URL of the generated image |
Implementation Reference
- src/index.ts:270-280 (handler)The handler function that executes the tool logic: calls displayGeneratedImage with the imageUrl and returns a text message confirming the display.async ({ imageUrl }) => { await displayGeneratedImage(imageUrl); return { content: [ { type: "text", text: `Image displayed at ${imageUrl}`, }, ], }; }
- src/index.ts:267-269 (schema)Input schema using Zod for the imageUrl parameter.{ imageUrl: z.string().describe("The URL of the generated image"), },
- src/index.ts:264-281 (registration)Registration of the 'display_generated_image' tool with McpServer using server.tool.server.tool( "display_generated_image", "This function will display the generated image in a new tab", { imageUrl: z.string().describe("The URL of the generated image"), }, async ({ imageUrl }) => { await displayGeneratedImage(imageUrl); return { content: [ { type: "text", text: `Image displayed at ${imageUrl}`, }, ], }; } );