Skip to main content
Glama

get_image_info

Extract metadata and key details from image files including format, dimensions, and properties. Use this tool to quickly retrieve essential image information for analysis or processing workflows.

Instructions

Get metadata and information about an image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputPathYesPath to image file

Implementation Reference

  • Handler for the 'get_image_info' tool. Uses Sharp's metadata() method to extract image properties (format, dimensions, channels, etc.) and fs.stat() for file size and modification time. Returns a JSON-formatted text response with the information.
    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 for the 'get_image_info' tool, requiring a single 'inputPath' string 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 tools list returned by the ListToolsRequestSchema handler.
    { 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'] } },

Other Tools

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

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