Skip to main content
Glama

list_supported_formats

Retrieve a list of supported image formats for conversion, ensuring compatibility before processing with the Image Converter MCP Server.

Instructions

列出支持的图片格式

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:190-197 (registration)
    Registration of the 'list_supported_formats' tool in the ListToolsRequestSchema handler, defining its name, description, and empty input schema.
    { name: 'list_supported_formats', description: '列出支持的图片格式', inputSchema: { type: 'object', properties: {} } }
  • The main handler for 'list_supported_formats' tool in the CallToolRequestSchema switch statement. It calls ImageConverter.getSupportedFormats() and returns a formatted text response listing input and output formats.
    case 'list_supported_formats': { const formats = this.converter.getSupportedFormats(); return { content: [ { type: 'text', text: `支持的图片格式:\n输入格式:${formats.input.join(', ')}\n输出格式:${formats.output.join(', ')}` } ] }; }
  • supportedOutputFormats array defining the output formats supported by the converter, used by getSupportedFormats().
    private supportedOutputFormats = [ 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'webp', 'svg', 'ico', 'avif' ];
  • supportedInputFormats array defining the input formats supported by the converter, used by getSupportedFormats().
    private supportedInputFormats = [ 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'tif', 'webp', 'svg', 'ico', 'psd', 'heic', 'heif', 'avif' ];
  • The core helper method getSupportedFormats() in ImageConverter class that returns the object with input and output supported formats lists.
    getSupportedFormats() { return { input: this.supportedInputFormats, output: this.supportedOutputFormats }; }

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/pickstar-2002/image-mcp'

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