retell_add_knowledge_base_sources
Add documentation sources like URLs or text content to enhance AI agent knowledge bases for improved conversation accuracy.
Instructions
Add documentation sources (URLs or text) to a knowledge base.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| knowledge_base_id | Yes | The knowledge base ID | |
| sources | Yes | Array of source configurations |
Implementation Reference
- src/index.ts:1237-1240 (handler)The handler logic in the executeTool switch statement. It extracts knowledge_base_id and sources from arguments and calls retellRequest to POST to the Retell API endpoint for adding sources to a knowledge base.case "retell_add_knowledge_base_sources": { const { knowledge_base_id, sources } = args; return retellRequest(`/add-knowledge-base-sources/${knowledge_base_id}`, "POST", { sources }); }
- src/index.ts:944-983 (schema)The tool definition in the tools array, including name, description, and detailed inputSchema for validating arguments: knowledge_base_id and sources array with type (url/text/document), optional url/content/title.{ name: "retell_add_knowledge_base_sources", description: "Add documentation sources (URLs or text) to a knowledge base.", inputSchema: { type: "object", properties: { knowledge_base_id: { type: "string", description: "The knowledge base ID" }, sources: { type: "array", description: "Array of source configurations", items: { type: "object", properties: { type: { type: "string", enum: ["url", "text", "document"], description: "Source type" }, url: { type: "string", description: "URL for url type sources" }, content: { type: "string", description: "Text content for text type sources" }, title: { type: "string", description: "Title for the source" } } } } }, required: ["knowledge_base_id", "sources"] } },
- src/index.ts:1283-1285 (registration)Registration of the ListTools handler which returns the tools array containing this tool's metadata.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });