Skip to main content
Glama

kobold_interrogate

Generate descriptive captions for images by integrating image analysis with text generation capabilities through the Kobold MCP Server.

Instructions

Generate caption for image

Input Schema

NameRequiredDescriptionDefault
apiUrlNohttp://localhost:5001
imageYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "apiUrl": { "default": "http://localhost:5001", "type": "string" }, "image": { "type": "string" } }, "required": [ "image" ], "type": "object" }

Implementation Reference

  • Generic POST handler logic that executes the kobold_interrogate tool by forwarding the request to the KoboldAI '/sdapi/v1/interrogate' endpoint after schema validation.
    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, };
  • src/index.ts:342-342 (registration)
    Registers the endpoint and schema mapping for the kobold_interrogate tool within the postEndpoints dispatch table.
    kobold_interrogate: { endpoint: '/sdapi/v1/interrogate', schema: InterrogateSchema },
  • src/index.ts:254-258 (registration)
    Registers kobold_interrogate in the list of available tools served by ListToolsRequestSchema.
    { name: "kobold_interrogate", description: "Generate caption for image", inputSchema: zodToJsonSchema(InterrogateSchema), },
  • Zod schema defining input for kobold_interrogate: optional apiUrl and required base64 image.
    const InterrogateSchema = BaseConfigSchema.extend({ image: z.string(), });
  • Helper function used by all proxy tools, including kobold_interrogate, to make HTTP requests to the KoboldAI backend.
    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(); }

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