Skip to main content
Glama
Ichigo3766

Image Generation MCP Server

by Ichigo3766

get_sd_models

Retrieve a list of available Stable Diffusion models for text-to-image generation and image upscaling via the Image Generation MCP Server. Simplify model selection for API-driven workflows.

Instructions

Get list of available Stable Diffusion models

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'get_sd_models' tool. Fetches the list of available Stable Diffusion models from the SD WebUI API endpoint '/sdapi/v1/sd-models' and returns an array of model titles as JSON string.
    case 'get_sd_models': {
      const response = await this.axiosInstance.get('/sdapi/v1/sd-models');
      const models = response.data as ModelInfo[];
      return { content: [{ type: 'text', text: JSON.stringify(models.map(m => m.title)) }] };
    }
  • Schema and registration of the 'get_sd_models' tool in the ListTools response. Defines no input parameters.
    {
      name: 'get_sd_models',
      description: 'Get list of available Stable Diffusion models',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      }
    },
  • Type interface for Stable Diffusion model information, used to type the API response in the handler.
    interface ModelInfo {
      title: string;
      model_name: string;
      hash: string;
      sha256: string;
      filename: string;
      config: string;
    }
Install Server

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/Ichigo3766/image-gen-mcp'

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