ragflow_upload_document
Adds a document to a RAGFlow dataset from text, base64 bytes, a URL, or an allowed local file, with optional parsing after upload.
Instructions
Add a document to a dataset from text, base64 bytes, a URL or an allowed local file.
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": {
"dataset_id": "<dataset_id>"
},
"name": "ragflow_upload_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | http(s) URL of a PDF or a web page; RAGFlow downloads it itself. Other file types from a URL are rejected by RAGFlow: send them as text or content_base64. | |
| text | No | UTF-8 text content, e.g. Markdown | |
| parse | No | Start parsing after the upload | |
| filename | No | Document name with an extension that sets the parser (.md, .txt, .pdf, .docx, ...). Required for text and content_base64; defaults to the file name for file_path and url. For url uploads RAGFlow keeps only letters, digits, - and _ and adds .pdf or .html itself. | |
| file_path | No | Path on the MCP server host, inside an allowed upload root | |
| dataset_id | Yes | Dataset (knowledge base) ID | |
| meta_fields | No | Document metadata, used for filtering in retrieval | |
| wait_seconds | No | Seconds to wait for parsing to finish; 0 returns immediately | |
| content_base64 | No | File bytes as base64 (small files only) | |
| replace_existing | No | If a document with the same name exists, replace it. Without this flag a duplicate name is an error. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||