Skip to main content
Glama

get_image_info

Extract metadata and technical details from image files to analyze dimensions, format, and properties for editing or processing workflows.

Instructions

Get metadata and information about an image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputPathYesPath to image file

Implementation Reference

  • Handler implementation for the 'get_image_info' tool. Extracts image metadata using Sharp and file system stats, returns formatted JSON with image properties.
    case 'get_image_info': { const { inputPath } = args; const metadata = await sharp(inputPath).metadata(); const stats = await fs.stat(inputPath); return { content: [ { type: 'text', text: JSON.stringify({ format: metadata.format, width: metadata.width, height: metadata.height, channels: metadata.channels, bitDepth: metadata.depth, colorSpace: metadata.space, density: metadata.density, hasAlpha: metadata.hasAlpha, fileSize: stats.size, lastModified: stats.mtime }, null, 2) } ] }; }
  • Input schema definition for the 'get_image_info' tool, specifying the required inputPath parameter.
    inputSchema: { type: 'object', properties: { inputPath: { type: 'string', description: 'Path to image file' } }, required: ['inputPath'] }
  • src/index.ts:155-165 (registration)
    Registration of the 'get_image_info' tool in the ListTools response, including name, description, and input schema.
    { name: 'get_image_info', description: 'Get metadata and information about an image', inputSchema: { type: 'object', properties: { inputPath: { type: 'string', description: 'Path to image file' } }, required: ['inputPath'] } },

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/flowy11/imagician'

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