List retrieval documents

retrievalDocuments(projectReference: ID!, limit: Int, cursor: String): RetrievalDocumentList!

Requires project.knowledge.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceID!YesProject ID or slug. A project you cannot read is not_found. The MCP tool requires a signed-in user (a user session or user API key); service and agent-run credentials without a user are unauthenticated.
limitIntNoRecords per page, 1 to 100; default 20.
cursorStringNoThe previous page's pageInfo.endCursor.

Response

Returns RetrievalDocumentList!. Open the type for its fields and nested types.

FieldTypeDescription
data[RetrievalDocument!]!Retrieval document records behind ragStore(), oldest first with ID as tie-breaker. Read the ID and current revision before updating or deleting. Follow the next cursor until null to read every record.
pageInfoPageInfo!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

query.graphql
query RetrievalDocuments($projectReference: ID!, $limit: Int, $cursor: String) {  retrievalDocuments(projectReference: $projectReference, limit: $limit, cursor: $cursor) {    data {      id      createdAt      updatedAt      metadata      revision    }    pageInfo {      hasNextPage      endCursor      hasPreviousPage      startCursor    }  }}
variables.json
{  "projectReference": "00000000-0000-4000-8000-000000000001"}