Skip to main content
Glama

kobold_sd_models

Retrieve available Stable Diffusion models from KoboldAI's MCP server for AI image generation tasks.

Instructions

List available Stable Diffusion models

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiUrlNohttp://localhost:5001

Implementation Reference

  • Handler for kobold_sd_models and other GET tools: maps to '/sdapi/v1/sd-models' endpoint and proxies the request via makeRequest, returning the JSON response.
    const getEndpoints: Record<string, string> = {
        kobold_max_context_length: '/api/v1/config/max_context_length',
        kobold_max_length: '/api/v1/config/max_length',
        kobold_generate_check: '/api/extra/generate/check',
        kobold_model_info: '/api/v1/model',
        kobold_version: '/api/v1/info/version',
        kobold_perf_info: '/api/extra/perf',
        kobold_sd_models: '/sdapi/v1/sd-models',
        kobold_sd_samplers: '/sdapi/v1/samplers',
    };
    
    if (getEndpoints[name]) {
        const result = await makeRequest(`${apiUrl}${getEndpoints[name]}`);
        return {
            content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
            isError: false,
        };
    }
  • src/index.ts:235-238 (registration)
    Tool registration in ListTools response, specifying name, description, and inputSchema.
        name: "kobold_sd_models",
        description: "List available Stable Diffusion models",
        inputSchema: zodToJsonSchema(SDModelsSchema),
    },
  • Input schema for kobold_sd_models tool, equivalent to BaseConfigSchema (optional apiUrl).
    const SDModelsSchema = BaseConfigSchema;
  • BaseConfigSchema used by SDModelsSchema and all tools, allowing optional apiUrl override.
    const BaseConfigSchema = z.object({
        apiUrl: z.string().default('http://localhost:5001'),
    });
  • Shared helper function makeRequest used to proxy all API calls, including for kobold_sd_models.
    async function makeRequest(url: string, method = 'GET', body: Record<string, unknown> | null = null) {
        const options: RequestInit = {
            method,
            headers: body ? { 'Content-Type': 'application/json' } : undefined,
        };
        
        if (body && method !== 'GET') {
            options.body = JSON.stringify(body);
        }
    
        const response = await fetch(url, options);
        if (!response.ok) {
            throw new Error(`KoboldAI API error: ${response.statusText}`);
        }
        
        return response.json();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states it's a list operation. It doesn't disclose behavioral traits like whether it's read-only, requires authentication, has rate limits, or what the output format might be (e.g., list of model names or details). This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 optional parameter) but lack of annotations and output schema, the description is incomplete. It doesn't cover what the tool returns (e.g., model list format), behavioral aspects, or usage context, leaving gaps for the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter (apiUrl) with 0% description coverage, but the description doesn't mention parameters at all. Since there's only one optional parameter, the baseline is high, but the description doesn't add any semantic context beyond the schema, such as explaining the default API URL's purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'available Stable Diffusion models', providing a specific action and target. However, it doesn't differentiate from sibling tools like 'kobold_model_info' which might provide similar model-related information, keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives such as 'kobold_model_info' or other model-related tools. There's no mention of prerequisites, context, or exclusions, leaving the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/PhialsBasement/KoboldCPP-MCP-Server'

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