Skip to main content
Glama
ragflow-kb-mcp
by feci

ragflow_retrieval

Read-only

Search RAGFlow datasets to retrieve matching text chunks and their source documents, with optional filters for documents, metadata, similarity, and reranking.

Instructions

Search datasets and return the matching chunks with their exact text and source document.

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": {
      "question": "<question>",
      "dataset_ids": "<dataset_ids>"
    },
    "name": "ragflow_retrieval"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number, starting at 1
top_kNoCandidates considered before reranking
keywordNoExpand the query with LLM keywords
questionYesQuery, ideally in the documents' language
page_sizeNo
rerank_idNoRerank model as model_name@factory
dataset_idsYesDatasets to search
document_idsNoLimit the search to these documents
metadata_conditionNoMetadata filter, as in ragflow_update_metadata
similarity_thresholdNo
vector_similarity_weightNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds that results are verbatim chunk text plus source document, which is genuinely useful behavior beyond annotations, but it says nothing about result ordering (rerank, similarity), pagination limits, or empty-result behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero filler. It is efficient, though for an 11-parameter retrieval tool the extreme terseness means it forfeits opportunities to add routing or behavioral detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter retrieval tool with thresholds, reranking, keyword expansion and pagination, the description explains none of that interaction. An output schema exists so return-format detail is not required, but the caller still cannot tell how paging/rerank settings should be combined or when to prefer this over listing chunks.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 73%, so most parameters are documented in the schema itself, and the description adds nothing beyond the required question/dataset_ids idea. Several parameters (page_size, similarity_threshold, vector_similarity_weight, page) rely entirely on the schema, so a baseline 3 is fair but not more.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (search) and resource (datasets) plus what is returned (matching chunks with exact text and source document). It is clear on its own, but it never distinguishes itself from nearby siblings such as ragflow_list_chunks, ragflow_search_app_completion, or ragflow_search_memory_messages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no mention of prerequisites (datasets must be parsed), and no routing to alternatives like list_chunks for enumeration versus this tool for semantic retrieval. Usage is only implied by the word 'Search'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools