Skip to main content
Glama
chacharin

mcp-lightrag

by chacharin

list_documents

List documents in the LightRAG knowledge base with pagination, status filtering, and sorting. Returns per-document summaries, total count, and pagination info.

Instructions

List documents in the knowledge base, with pagination. This is the tool to use for "how many documents are there" or "list the documents" -- do not conclude the knowledge base is empty from a tool failure; that means LightRAG could not be reached, not that there are zero documents (this is the exact bug this server exists to fix). Returns a trimmed per-document summary (id, file_path, status, chunks_count, updated_at, error_msg if any) plus total_count and has_next.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number, 1-based.
page_sizeNoDocuments per page (10-200).
sort_fieldNoField to sort by.updated_at
status_filterNoOnly return documents in this status. Omit to return documents in every status.
sort_directionNoSort direction.desc

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses pagination behavior, the trimmed per-document summary fields, total_count and has_next, and the critical failure semantics (LightRAG unreachable vs. zero documents). It doesn't mention rate limits or auth, but for a read-only listing tool the disclosed behavior is substantial.

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?

Three sentences, front-loaded with the core purpose, then the critical failure-mode warning, then the return shape. Every sentence earns its place and the most important behavioral caveat is placed early.

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

Completeness5/5

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

For a paginated list tool with a rich output schema and 100% parameter coverage, the description covers purpose, usage, failure semantics, and return shape. Nothing an agent needs to call it correctly is missing.

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%, so the schema already documents all 5 parameters. The description adds context about pagination and the return shape but doesn't add meaning beyond the schema for individual parameters. Baseline 3 is appropriate.

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

Purpose5/5

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

The description states a specific verb ('List documents in the knowledge base') and resource, and explicitly distinguishes this tool from the failure mode of concluding the knowledge base is empty. It also names the return shape, making it clear this is the listing tool among siblings like scan_documents or get_document_status_counts.

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

Usage Guidelines5/5

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

The description explicitly says this is the tool to use for 'how many documents are there' or 'list the documents', and warns against misinterpreting a tool failure as an empty knowledge base. This gives clear when-to-use guidance and a critical exclusion (do not conclude empty on failure).

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