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

ragflow_get_file_ancestors

Read-only

Lists all parent folders above a file or folder in the RAGFlow file manager, up to the root, to reveal its full hierarchy.

Instructions

List all folders above a file or folder, up to the root.

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": {
      "file_id": "<file_id>"
    },
    "name": "ragflow_get_file_ancestors"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYesFile or folder ID in the RAGFlow file manager

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare this is a read-only, non-destructive, closed operation, so the safety profile is covered. The description adds the traversal scope ('above a file or folder, up to the root'), which is useful behavioral context, but it does not specify ordering, whether the starting item itself is included, or pagination behavior.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no redundant or filler text. Every phrase contributes to stating the resource scope.

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

Completeness4/5

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

For a simple read-only lookup with one fully documented parameter, an output schema, and annotations declaring safety, the description is largely complete. It could be more explicit about how the result is ordered or whether the input item is included, but those gaps are minor given the structured data available.

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 description coverage is 100%, and the sole parameter file_id is already documented in the schema as a file or folder ID in the RAGFlow file manager. The description adds no further meaning about the parameter's syntax or behavior beyond what the schema provides.

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?

The description states a specific verb and resource: list all folders above a file or folder, up to the root. The word 'all' and 'up to the root' distinguish it from the sibling ragflow_get_parent_folder, which presumably returns only a single parent, though the sibling is not explicitly named.

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

Usage Guidelines3/5

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

The description implies when the tool is useful (when you need the full ancestor path for a file or folder), but it does not explicitly say when to use it versus ragflow_get_parent_folder or other folder-listing tools. There are no exclusions or prerequisites stated.

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