Skip to main content
Glama

list_supported_formats

Lists all image formats supported for conversion, including JPG, PNG, WebP, GIF, BMP, TIFF, SVG, ICO, and AVIF.

Instructions

列出支持的图片格式

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'list_supported_formats' that invokes the ImageConverter's getSupportedFormats() method and formats the response as text content 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(', ')}`
          }
        ]
      };
    }
  • Core helper method that returns the object containing arrays of supported input and output image formats.
    getSupportedFormats() {
      return {
        input: this.supportedInputFormats,
        output: this.supportedOutputFormats
      };
    }
  • Class properties defining the lists of supported input and output image formats used by getSupportedFormats().
    private supportedInputFormats = [
      'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'tif', 
      'webp', 'svg', 'ico', 'psd', 'heic', 'heif', 'avif'
    ];
    
    private supportedOutputFormats = [
      'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'webp', 
      'svg', 'ico', 'avif'
    ];
  • src/index.ts:191-197 (registration)
    Tool registration in the ListTools response, including name, description, and empty input schema (no parameters required).
      name: 'list_supported_formats',
      description: '列出支持的图片格式',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    }
  • Input schema definition for the tool: an empty object since no parameters are needed.
    inputSchema: {
      type: 'object',
      properties: {}
    }

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