MCP server for RAGFlow knowledge base integration with Claude, providing dataset and document retrieval, chat sessions, and advanced query capabilities with DSPy-based query deepening and reranking
The server exposes 7 RAGFlow-related tools with clear naming patterns (ragflow_* prefix) and mostly complete JSON schemas. Naming follows verb_noun convention reasonably well (list_*, get_*, retrieve_*, reset_*). Descriptions are present for all tools and most parameters, though some are generic or lack actionable context. All tools include input schemas with type definitions and required field lists. However, there are notable gaps: (1) no output schemas documented anywhere in the code, (2) parameter descriptions vary significantly in quality and actionability, (3) no error handling guidance shown in tool definitions, (4) no indication of pagination limits or result caps for list/retrieval operations. Tool definitions are explicit and visible in handle_list_tools(), so all tools score above 50. The retrieval tools (ragflow_retrieval, ragflow_retrieval_by_name) are the strongest, with detailed parameter descriptions for advanced features like reranking and deepening_level. Simple list/reset tools lack context about prerequisites, side effects, or when to call them relative to other tools.
Get chunks with references from a specific document
List all available datasets/knowledge bases in RAGFlow
List documents in a specific dataset
List active chat sessions for all datasets
Reset/clear the chat session for a specific dataset
Retrieve document chunks directly from RAGFlow datasets using the retrieval API. Returns raw chunks with similarity scores.
No output schemas documented for any tool. LLMs cannot plan downstream operations or extract required fields without knowing the response structure.
ragflow_reset_session lacks any indication that it is a destructive operation. Description does not warn about side effects, and no confirmation or dry-run pattern is evident. Agents may call it unintentionally.
List tools (ragflow_list_datasets, ragflow_list_sessions) have no pagination parameters (page, limit, offset). If RAGFlow returns large result sets, context window will be blown and LLM reasoning will degrade. No indication of result caps.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-21 | D | 54 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 46 | - | v1 |
Retrieve document chunks by dataset names using the retrieval API. Returns raw chunks with similarity scores.
Parameter descriptions in simpler tools lack actionable context. 'ID of the dataset' does not explain what a dataset is, how to discover datasets, or when to call list_datasets first. Compare to ragflow_retrieval, which has rich descriptions for each advanced parameter.
No error handling guidance in tool definitions. Code shows custom exceptions (RAGFlowAPIError, RAGFlowConnectionError, ValidationError, DatasetNotFoundError) but tool descriptions do not explain what LLM should do on failure or what specific errors are possible.