kobold_abort
Stop the active text generation process on the Kobold MCP Server by using this tool. Ideal for halting ongoing tasks when needed.
Instructions
Abort the currently ongoing generation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiUrl | No | http://localhost:5001 |
Implementation Reference
- src/index.ts:346-358 (handler)Handler logic for kobold_abort (and other POST tools): validates input using AbortSchema, proxies POST request to KoboldAI /api/extra/abort endpoint, returns JSON response.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:338-338 (registration)Dispatch registration mapping kobold_abort to its endpoint '/api/extra/abort' and validation schema.kobold_abort: { endpoint: '/api/extra/abort', schema: AbortSchema },
- src/index.ts:224-227 (registration)Public tool registration in ListTools response.name: "kobold_abort", description: "Abort the currently ongoing generation", inputSchema: zodToJsonSchema(AbortSchema), },
- src/index.ts:69-69 (schema)Input schema for kobold_abort tool (aliases BaseConfigSchema).const AbortSchema = BaseConfigSchema;
- src/index.ts:146-162 (helper)Helper function used by all proxy tools including kobold_abort to make HTTP requests to 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(); }
- src/index.ts:11-13 (schema)Base schema extended/aliased by AbortSchema, provides optional apiUrl.const BaseConfigSchema = z.object({ apiUrl: z.string().default('http://localhost:5001'), });