Skip to main content
Glama

kobold_interrogate

Generate descriptive captions for images using AI analysis to identify content, objects, and scenes automatically.

Instructions

Generate caption for image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiUrlNohttp://localhost:5001
imageYes

Implementation Reference

  • Zod schema for input validation of the kobold_interrogate tool. Extends BaseConfigSchema with a required 'image' field (base64 encoded image). Used for both tool registration and request validation.
    const InterrogateSchema = BaseConfigSchema.extend({
        image: z.string(),
    });
  • src/index.ts:254-258 (registration)
    Registers the kobold_interrogate tool in the ListTools response, providing name, description, and input schema.
    {
        name: "kobold_interrogate",
        description: "Generate caption for image",
        inputSchema: zodToJsonSchema(InterrogateSchema),
    },
  • src/index.ts:342-342 (registration)
    Maps the kobold_interrogate tool name to its KoboldAI API endpoint '/sdapi/v1/interrogate' and validation schema within the POST endpoints dispatch table.
    kobold_interrogate: { endpoint: '/sdapi/v1/interrogate', schema: InterrogateSchema },
  • Core handler logic for kobold_interrogate (and other POST tools): parses input with schema, forwards POST request to apiUrl + endpoint with arguments, returns JSON response as text content.
    if (postEndpoints[name]) {
        const { endpoint, schema } = postEndpoints[name];
        const parsed = schema.safeParse(args);
        if (!parsed.success) {
            throw new Error(`Invalid arguments: ${parsed.error}`);
        }
    
        const result = await makeRequest(`${apiUrl}${endpoint}`, 'POST', requestData);
        return {
            content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
            isError: false,
        };
  • Utility function used by the handler to perform HTTP requests to the KoboldAI backend API, handling JSON serialization and error checking.
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Generate caption') but lacks details on permissions, rate limits, error handling, or what the output looks like (e.g., format, length). For a tool with no annotation coverage, this is insufficient to inform the agent about key behavioral traits beyond the basic operation.

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 extremely concise at three words, front-loading the core purpose without any fluff. Every word ('Generate', 'caption', 'image') earns its place by directly contributing to understanding the tool's function, making it efficient and easy to parse.

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 complexity (image processing with 2 parameters), lack of annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't address parameter meanings, behavioral aspects, or output expectations, leaving significant gaps for the agent to infer usage correctly in this context.

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

Parameters2/5

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

Schema description coverage is 0%, meaning parameters 'apiUrl' and 'image' are undocumented in the schema. The description adds no information about these parameters—it doesn't explain what 'image' should contain (e.g., file path, base64 data) or what 'apiUrl' is for. With low coverage and no compensation in the description, this leaves parameters largely ambiguous.

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 'Generate caption for image' clearly states the verb ('Generate') and resource ('caption for image'), making the purpose immediately understandable. It distinguishes from most siblings (e.g., kobold_chat, kobold_generate) by specifying image captioning, though it doesn't explicitly differentiate from kobold_img2img or kobold_txt2img which are also image-related but serve different purposes.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like kobold_img2img (for image-to-image generation) or kobold_transcribe (for audio transcription), nor does it specify prerequisites such as needing an image input or when caption generation is appropriate. This leaves the agent with minimal context for tool selection.

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