Skip to main content
Glama

kobold_tts

Convert text to speech audio using customizable voice and speed settings, integrated with Kobold MCP Server for enhanced AI-driven applications.

Instructions

Generate text-to-speech audio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiUrlNohttp://localhost:5001
speedNo
textYes
voiceNo

Implementation Reference

  • Shared handler logic that executes kobold_tts by validating input against TTSSchema, then proxying a POST request to the KoboldAI TTS endpoint (/api/extra/tts) and returning the 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, };
  • Zod schema defining the input parameters for the kobold_tts tool: required 'text', optional 'voice' and 'speed', extending BaseConfigSchema with 'apiUrl'.
    const TTSSchema = BaseConfigSchema.extend({ text: z.string(), voice: z.string().optional(), speed: z.number().optional(), });
  • src/index.ts:218-222 (registration)
    Registers the kobold_tts tool in the ListTools response, providing name, description, and input schema.
    { name: "kobold_tts", description: "Generate text-to-speech audio", inputSchema: zodToJsonSchema(TTSSchema), },
  • src/index.ts:337-337 (registration)
    Maps the kobold_tts tool name to its KoboldAI endpoint (/api/extra/tts) and schema for dispatch in the CallTool handler.
    kobold_tts: { endpoint: '/api/extra/tts', schema: TTSSchema },
  • Utility function used by the handler to perform HTTP requests to the KoboldAI backend 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(); }

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