add_knowledge_file
Add a local file's content to a knowledge base (txt/md/html/pdf/docx).
**This MCP runs on the platform server and cannot read paths on YOUR machine.** For text
files, read the content yourself and call `add_knowledge_text`; for binaries (pdf/docx),
upload via the console, or curl `/knowledge-bases/{name}/documents/upload`.
**To ingest a whole folder, zip it and send that one endpoint** — subdirectories are walked,
md/txt/pdf/html/docx are ingested one by one, and document names use the in-archive relative
path (`2025/rates.pdf` vs `2026/rates.pdf` therefore never collide). Images, `.DS_Store` etc.
inside the zip are ignored; if the archive contains an encrypted, corrupt or abnormally
high-compression file, **the whole archive is rejected** naming the offending entry.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kb_name": "<kb_name>",
"path": "<path>"
},
"name": "add_knowledge_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| title | No | ||
| kb_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |