Skip to main content
Glama

List RAG Chunks

dataset.chunks
Read-onlyIdempotent

Retrieve LangChain/LlamaIndex-ready text chunks from an indexed dataset (Pro+ plan).

Returns paginated RAG chunks. Each chunk includes text, token count, and metadata
(quality grade, PII masking status, document type, language). Use FlexOrchRetriever
or FlexOrchReader from the flexorch-sdk for automatic pagination.
The dataset must be indexed first via dataset.index(dataset_id).

Args:
    dataset_id:     ID of the indexed dataset.
    min_quality:    Minimum quality grade to include: A, B, C, or D. Default: B.
                    Chunks with grade at or above this threshold are returned.
                    Example: "B" returns grade A and B chunks.
    pii_masked_only: When true, return only chunks where PII was masked. Default: false.
    page:           Page number, 1-indexed. Default: 1.
    page_size:      Chunks per page, max 100. Default: 20.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
page_sizeNo
dataset_idYes
min_qualityNoB
pii_masked_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
errorNo
totalNo
chunksNo
isErrorNo
has_moreNo
page_sizeNo
dataset_idNo
chunk_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true, but the description adds useful behavioral context: pagination behavior, the requirement that the dataset must be indexed first, and the quality threshold semantics. It discloses what the returned chunks include (text, token count, metadata fields) and the Pro+ plan limitation. It doesn't describe pagination limits beyond page_size max, but overall it goes beyond annotations without contradicting them.

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?

The description is well-structured with a short overview paragraph, a prerequisite note, and a clear Args list. Every sentence adds value: the return payload summary, the SDK pagination pointer, and the indexing prerequisite are all useful. It is slightly long but the density of relevant information justifies its length.

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 read-only, paginated listing tool, the description covers the key operational details: prerequisite (indexing), pagination behavior, response contents, and parameter semantics. It has an output schema available to explain return values, so the description need not detail them. Missing minor details like error cases or auth requirements, but these are largely covered by the overall context and the tool's read-only nature.

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

Parameters4/5

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

Schema description coverage is 0%, so the description carries the full burden of explaining parameters. It explains min_quality threshold semantics with a concrete example ('B' returns A and B), clarifies pii_masked_only meaning, notes page is 1-indexed, and specifies page_size max is 100. Only dataset_id is minimally described ('ID of the indexed dataset'), but the description compensates for the schema's total lack of description.

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 ('Retrieve'), a resource ('text chunks from an indexed dataset'), and an application context ('LangChain/LlamaIndex-ready'). It clearly distinguishes from siblings like dataset.search by focusing on paginated chunk retrieval rather than search or indexing.

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 states when to use this tool: after the dataset has been indexed via dataset.index(dataset_id), and it mentions using FlexOrchRetriever/FlexOrchReader from the flexorch-sdk for automatic pagination. It gives clear context for the indexed-dataset prerequisite, which distinguishes it from dataset.index and dataset.build.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources