Skip to main content
Glama

display_generated_image

Display generated images in a new browser tab by providing the image URL. This tool visualizes AI-generated content for review and sharing.

Instructions

This function will display the generated image in a new tab

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageUrlYesThe URL of the generated image

Implementation Reference

  • Core handler function that opens and displays the generated image URL using the 'open' library and logs the URL.
    export async function displayGeneratedImage(imageUrl: string): Promise<void> { await open(imageUrl); console.log(`Image displayed at ${imageUrl}`); }
  • Zod input schema defining the 'imageUrl' parameter as a required string.
    { imageUrl: z.string().describe("The URL of the generated image"), },
  • src/index.ts:264-281 (registration)
    MCP server tool registration for 'display_generated_image', including name, description, schema, and thin wrapper handler that invokes the core displayGeneratedImage function.
    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}`, }, ], }; } );

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/virajsamarasinghe/MCP-Claude'

If you have feedback or need assistance with the MCP directory API, please join our Discord server