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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:297-301 (handler)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)) }] }; }
- src/index.ts:172-180 (schema)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: [] } },
- src/index.ts:64-71 (helper)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; }