list_records
Retrieve records from a PocketBase collection with filtering, sorting, pagination, and field selection options to manage database data.
Instructions
List records from a collection with optional filters
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
expand | No | Comma-separated list of relation fields to expand (e.g. 'author,comments.user') | |
fields | No | Comma-separated fields to return in the response (e.g. 'id,title,author') | |
filter | No | Filter query using PocketBase filter syntax (e.g. 'status = true && created > "2022-08-01 10:00:00"') | |
page | No | Page number for pagination (default: 1) | |
perPage | No | Items per page (default: 50, max: 500) | |
skipTotal | No | If set to true, the total count query will be skipped to improve performance | |
sort | No | Sort field and direction (e.g. '-created,title' for descending created date followed by ascending title) |
Input Schema (JSON Schema)
{
"properties": {
"collection": {
"description": "Collection name",
"type": "string"
},
"expand": {
"description": "Comma-separated list of relation fields to expand (e.g. 'author,comments.user')",
"type": "string"
},
"fields": {
"description": "Comma-separated fields to return in the response (e.g. 'id,title,author')",
"type": "string"
},
"filter": {
"description": "Filter query using PocketBase filter syntax (e.g. 'status = true && created > \"2022-08-01 10:00:00\"')",
"type": "string"
},
"page": {
"description": "Page number for pagination (default: 1)",
"type": "number"
},
"perPage": {
"description": "Items per page (default: 50, max: 500)",
"type": "number"
},
"skipTotal": {
"description": "If set to true, the total count query will be skipped to improve performance",
"type": "boolean"
},
"sort": {
"description": "Sort field and direction (e.g. '-created,title' for descending created date followed by ascending title)",
"type": "string"
}
},
"required": [
"collection"
],
"type": "object"
}