textrawl
byJeff Green

list_documents

Browse documents with pagination and filtering

Browse all documents in your knowledge base with pagination and filtering options.

Parameters

ParameterTypeRequiredDefaultDescription
limitnumberOPTIONAL20Results per page (1-100)
offsetnumberOPTIONAL0Skip this many results
sourceTypeenumOPTIONAL-Filter by: note, file, url
tagsstring[]OPTIONAL-Filter by tags (AND logic)
sortByenumOPTIONALcreated_atSort by: created_at, updated_at, title
sortOrderenumOPTIONALdescSort order: asc, desc

Example Request

{
  "limit": 10,
  "offset": 0,
  "sourceType": "note",
  "tags": ["work"],
  "sortBy": "created_at",
  "sortOrder": "desc"
}

Response

{
  "documents": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "Q4 Planning Notes",
      "sourceType": "note",
      "tags": ["work", "planning"],
      "createdAt": "2024-10-15T14:30:00Z",
      "updatedAt": "2024-10-15T14:30:00Z"
    }
  ],
  "total": 42,
  "limit": 10,
  "offset": 0,
  "hasMore": true
}

Output Schema

This tool MUST return structuredContent alongside the text response. The structuredContent object MUST use canonical verbose keys regardless of the COMPACT_RESPONSES setting.

FieldTypeDescription
documentsarrayArray of document objects
documents[].idstringDocument UUID
documents[].titlestringDocument title
documents[].sourceTypestringSource type (note, file, url)
documents[].tagsstring[]Document tags
documents[].createdAtstringISO creation timestamp
documents[].updatedAtstringISO update timestamp
paginationobjectPagination metadata
pagination.limitintegerPage size
pagination.offsetintegerCurrent offset
pagination.totalintegerTotal document count
pagination.hasMorebooleanWhether more pages exist

Pagination

Use limit and offset for pagination:

Page 1: limit=10, offset=0
Page 2: limit=10, offset=10
Page 3: limit=10, offset=20

Filtering Examples

By Source Type

{ "sourceType": "file" }

Returns only uploaded files.

By Multiple Tags

{ "tags": ["work", "q4"] }

Returns documents with BOTH tags.

Combined Filters

{
  "sourceType": "note",
  "tags": ["important"],
  "sortBy": "created_at",
  "sortOrder": "asc"
}

On this page