Skip to main content
Glama
nickbaumann98

EverArt Forge MCP Server

list_images

Retrieve all stored images from the EverArt Forge MCP Server to manage and access generated AI artwork.

Instructions

List all stored images

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler for the 'list_images' tool. Lists images from storage directory using listStoredImages helper, groups by file type, formats a detailed text response with counts and recent file URLs.
    case "list_images": { try { const files = await listStoredImages(); if (files.length === 0) { return { content: [{ type: "text", text: "No stored images found. Try generating some images first!" }], }; } // Group files by type for better display const filesByType: Record<string, string[]> = {}; for (const file of files) { const ext = path.extname(file).slice(1).toLowerCase(); if (!filesByType[ext]) { filesByType[ext] = []; } filesByType[ext].push(file); } let resultText = "📁 Stored images:\n\n"; for (const [type, typeFiles] of Object.entries(filesByType)) { resultText += `${type.toUpperCase()} Files (${typeFiles.length}):\n`; resultText += typeFiles.map(f => `• ${f}`).join("\n"); resultText += "\n\n"; } resultText += `Total: ${files.length} file(s)`; // Add file URLs instead of trying to embed images const recentFiles = files.slice(-5); const fileUrls: string[] = []; for (const file of recentFiles) { const filepath = path.join(STORAGE_DIR, file); fileUrls.push(`file://${filepath}`); } return { content: [ { type: "text", text: resultText }, ...(fileUrls.length > 0 ? [{ type: "text", text: "\nRecent images:\n" + fileUrls.map(url => `• ${url}`).join('\n') }] : []), ], }; } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : "Unknown error"; return errorResponse({ type: EverArtErrorType.STORAGE_ERROR, message: `Error listing images: ${errorMessage}` }); } }
  • Helper function that reads the STORAGE_DIR and returns an array of image files matching supported extensions (svg, png, jpg, jpeg, webp). Handles missing directory gracefully.
    async function listStoredImages(): Promise<string[]> { try { const files = await fs.readdir(STORAGE_DIR); return files.filter((file: string) => /\.(svg|png|jpe?g|webp)$/i.test(file)); } catch (error) { if ((error as NodeJS.ErrnoException).code === "ENOENT") { return []; } throw error; } }
  • src/index.ts:420-426 (registration)
    Tool registration in the ListToolsRequestSchema response, including name, description, and empty inputSchema (no parameters required).
    name: "list_images", description: "List all stored images", inputSchema: { type: "object", properties: {}, }, },
  • Input schema for list_images tool: empty object since no parameters are needed.
    inputSchema: { type: "object", properties: {}, }, },

Other Tools

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/nickbaumann98/everart-forge-mcp'

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