Skip to main content
Glama

kobold_sd_samplers

Retrieve available Stable Diffusion samplers to select appropriate methods for AI image generation within the KoboldAI integration environment.

Instructions

List available Stable Diffusion samplers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiUrlNohttp://localhost:5001

Implementation Reference

  • Handler logic for the 'kobold_sd_samplers' tool (and other GET tools): maps tool name to KoboldAI API endpoint '/sdapi/v1/samplers' and proxies the GET request using 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:240-243 (registration)
    Registration of the 'kobold_sd_samplers' tool in the ListTools response.
        name: "kobold_sd_samplers",
        description: "List available Stable Diffusion samplers",
        inputSchema: zodToJsonSchema(SDSamplersSchema),
    },
  • Schema definition for 'kobold_sd_samplers' input (references shared BaseConfigSchema with optional apiUrl).
    const SDSamplersSchema = BaseConfigSchema;
  • Base schema used by 'kobold_sd_samplers' (and other tools) for optional apiUrl configuration.
    const BaseConfigSchema = z.object({
        apiUrl: z.string().default('http://localhost:5001'),
    });
  • Helper function used by the handler to make HTTP requests to the KoboldAI API.
    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 the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't cover aspects like rate limits, authentication needs, error handling, or response format. This leaves significant gaps for a tool that interacts with an external API.

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 with zero wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's low complexity (single optional parameter, no output schema, no annotations), the description is adequate as a minimum viable explanation. However, it lacks details on behavioral traits like API interaction patterns or error handling, which would be helpful for completeness.

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 description doesn't mention parameters, but with only one parameter (apiUrl) and 0% schema description coverage, this is acceptable. The tool's purpose as a listing operation suggests the parameter is for API configuration, and the description doesn't need to compensate heavily for the minimal parameter set.

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 action ('List') and resource ('available Stable Diffusion samplers'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'kobold_sd_models' which lists models rather than samplers, missing explicit sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or exclusions, leaving the agent with no usage instructions beyond the basic purpose.

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