Simple MCP server for RAGFlow that provides tools to interact with RAGFlow knowledge bases, datasets, and chat assistants
RAGFlow MCP presents a foundational dataset management and RAG query interface with significant structural gaps. All 4 tools are explicitly registered via @mcp.tool() decorators with input schemas visible in main.py. However, definitions lack rigor across naming clarity, parameter descriptions, and output documentation. Naming follows verb_noun convention (get_, create_, upload_, query_) but descriptions are inconsistent, ranging from 49 chars (get_ragflow_datasets, missing description entirely per source) to 153 chars (query_rag). Critical gaps: (1) get_ragflow_datasets has no docstring visible and returns unstructured data; (2) upload_rag and query_rag return dict/str inconsistently without documented schemas; (3) parameter descriptions are minimal ('The name of the dataset to create' vs. actionable constraints); (4) no error recovery guidance, exceptions converted to strings ('Error querying dataset: {str(e)}'); (5) no pagination for list operations; (6) output structure not formalized (blobs as raw strings, reference/answer fields undocumented). Per-tool analysis shows naming is solid but descriptions and schema documentation are weak. This is a D-tier server, functional but lacks production rigor.
Creates a initial knowledge base and dataset for the user.
Retrieves a list of all datasets from the RAGFlow knowledge base
Queries the specified dataset in the knowledge base to retrieve an answer based on the provided query.
Uploads documents and provide more knowledge base for the dataset.
get_ragflow_datasets has no docstring and returns untyped data (likely list or dict). No output schema documented.
Output schemas not documented for any tool. upload_rag and query_rag return mixed str/dict types inconsistently. LLM cannot plan downstream calls without knowing response structure. Violates pattern:response-shaper and baseline requirement (100% of A+ tools have documented return types).
Parameter descriptions are minimal and lack constraints. E.g., 'display_names': 'List of display names for the documents', no format, length, or character restrictions mentioned. 'blobs': 'List of document contents as strings', no max size, encoding, or format constraints. Violates pattern:constrained-input and baseline (100% of A+ tool params have descriptions with constraints).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 58 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 59 | - | v1 |
Error handling returns raw exception strings ('Error fetching datasets: {str(e)}', 'Error querying dataset: {str(e)}'). No recovery guidance, LLM cannot determine if error is retryable, user-fixable, or fatal. Violates pattern:recovery-guide.
get_ragflow_datasets accepts no parameters (empty input schema {}) but provides no pagination, filtering, or limit controls. If dataset list is large, response will blow context window.
Parameter 'name' in create_rag lacks context: is it a human-friendly name, system ID, or both? No max length, character restrictions, or uniqueness guarantees documented.
upload_rag accepts 'blobs' as raw document strings. No guidance on max file size, encoding (UTF-8? binary?), or handling of unsupported formats.
query_rag returns reference and answer fields without structure. What is the type of 'reference'? Is it a list of documents, a single doc, or metadata? What fields does it contain? Documented return schema required.