retell_list_knowledge_bases
Retrieve all available knowledge bases to manage AI agent information sources for voice and chat interactions.
Instructions
List all knowledge bases.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1233-1234 (handler)Handler logic for the retell_list_knowledge_bases tool. Dispatches to the generic retellRequest helper with the specific API endpoint /list-knowledge-bases using GET method.case "retell_list_knowledge_bases": return retellRequest("/list-knowledge-bases", "GET");
- src/index.ts:922-929 (registration)MCP tool registration for retell_list_knowledge_bases, defining name, description, and input schema (no required parameters).{ name: "retell_list_knowledge_bases", description: "List all knowledge bases.", inputSchema: { type: "object", properties: {} } },
- src/index.ts:925-928 (schema)Input schema definition for the tool, specifying an empty object (no input parameters required).inputSchema: { type: "object", properties: {} }
- src/index.ts:23-57 (helper)Core helper function that performs authenticated HTTP requests to the Retell API, handling headers, body, errors, and JSON responses. Used by all Retell tools including this one.async function retellRequest( endpoint: string, method: string = "GET", body?: Record<string, unknown> ): Promise<unknown> { const apiKey = getApiKey(); const headers: Record<string, string> = { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json", }; const options: RequestInit = { method, headers, }; if (body && method !== "GET") { options.body = JSON.stringify(body); } const response = await fetch(`${RETELL_API_BASE}${endpoint}`, options); if (!response.ok) { const errorText = await response.text(); throw new Error(`Retell API error (${response.status}): ${errorText}`); } // Handle 204 No Content if (response.status === 204) { return { success: true }; } return response.json(); }