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
| Name | Required | Description | Default |
|---|---|---|---|
| apiUrl | No | http://localhost:5001 | |
| image | Yes |
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
- src/index.ts:346-357 (handler)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), },
- src/index.ts:93-95 (schema)Zod schema defining input for kobold_interrogate: optional apiUrl and required base64 image.const InterrogateSchema = BaseConfigSchema.extend({ image: z.string(), });
- src/index.ts:146-162 (helper)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(); }