get_collection_items
Read rows from a Directus collection with filtering, sorting, field selection, search, and pagination, including version reads; retrieve content data within token permissions.
Instructions
Reads items (rows) from one collection with Directus filtering, sorting, field selection, full-text search and pagination. This is the read path for content: use get_users, get_files or get_flows for those system collections, and get_collection_schema when the shape rather than the data is wanted. Returns at most 25 items unless limit says otherwise, so paginate with offset over large collections. Results are scoped to what the token may read, so a filter can legitimately return fewer rows than exist. On versioned collections, version reads one draft and version_raw returns the delta instead of the merged item. Since Directus 12.6.1 search also matches related fields through a many-to-many junction.
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": {
"collection": "<collection>"
},
"name": "get_collection_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort fields | |
| limit | No | Number of items to return (default: 25) | |
| fields | No | Fields to return | |
| filter | No | Filter conditions | |
| offset | No | Number of items to skip | |
| search | No | Full-text search across the collection's searchable fields. Since Directus 12.6.1 a search on a many-to-many junction also matches the related fields, and a numeric search no longer matches hidden ID fields such as the junction row ID. | |
| version | No | Content version to read from a versioned collection. Use 'published' for the published version, or a version key for a draft. | |
| collection | Yes | Collection name | |
| version_raw | No | Return the raw version delta instead of the item merged with its version |