Skip to main content
Glama

kobold_abort

Stop text generation processes in KoboldAI by aborting ongoing operations through the MCP server integration.

Instructions

Abort the currently ongoing generation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiUrlNohttp://localhost:5001

Implementation Reference

  • Handler logic for executing the kobold_abort tool (shared with other POST tools): validates input using AbortSchema, then proxies a POST request to KoboldAI API's /api/extra/abort endpoint.
    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, };
  • Input schema for kobold_abort tool, inheriting from BaseConfigSchema which provides optional apiUrl.
    const AbortSchema = BaseConfigSchema;
  • src/index.ts:338-338 (registration)
    Maps the kobold_abort tool name to its KoboldAI API endpoint and schema for dispatching in the CallTool handler.
    kobold_abort: { endpoint: '/api/extra/abort', schema: AbortSchema },
  • src/index.ts:223-227 (registration)
    Registers kobold_abort tool in the ListTools response with name, description, and input schema.
    { name: "kobold_abort", description: "Abort the currently ongoing generation", inputSchema: zodToJsonSchema(AbortSchema), },
  • Utility function to make HTTP requests to the KoboldAI backend, used by the kobold_abort handler.
    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