import_file_to_kb
Read supported files such as PDF, DOCX, XLSX, CSV, TXT, MD, JSON, and HTML, then create a Knowledge Base document on the target agent in one call.
Instructions
End-to-end shortcut: read any supported file (PDF / DOCX / XLSX / CSV / TXT / MD / JSON / HTML) and create a Knowledge Base document on the target agent in one call. The file is parsed locally to text/markdown and pushed to the agent's KB via create_kb_doc with sourceType='doc'. Use pages for PDFs and sheet for spreadsheets to control what gets ingested. Images are NOT supported here (they need OCR or vision — use read_image instead).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| data | No | ||
| name | No | KB document name. Defaults to the source filename. | |
| path | No | ||
| tags | No | Optional tags. | |
| pages | No | PDF only: page selection. | |
| sheet | No | Spreadsheet only: which sheet to ingest (default: first). | |
| agentId | Yes | Target agent ID. | |
| mimeType | No | ||
| asMarkdown | No | Prefer markdown output (default: true). |