Skip to main content
Glama

retell_get_knowledge_base

Retrieve configuration details for a knowledge base to access structured information within the Retell AI voice and chat agent platform.

Instructions

Retrieve a knowledge base configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
knowledge_base_idYesThe knowledge base ID

Implementation Reference

  • Tool definition including name, description, and input schema requiring 'knowledge_base_id'.
    { name: "retell_get_knowledge_base", description: "Retrieve a knowledge base configuration.", inputSchema: { type: "object", properties: { knowledge_base_id: { type: "string", description: "The knowledge base ID" } }, required: ["knowledge_base_id"] } },
  • Handler logic that calls the generic retellRequest helper to fetch the knowledge base via GET /get-knowledge-base/{knowledge_base_id}.
    case "retell_get_knowledge_base": return retellRequest(`/get-knowledge-base/${args.knowledge_base_id}`, "GET");
  • src/index.ts:1283-1285 (registration)
    Registers the tool list (including retell_get_knowledge_base) by handling ListToolsRequest and returning the static tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • Generic API request helper used by all Retell tools, including authentication, error handling, and JSON serialization.
    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(); }

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/itsanamune/retellsimp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server