List records with pagination, or count them
record_queryList records with pagination, or count them
Always keyset-paginated: when nextCursor comes back non-null there ARE more records — page with it instead of raising limit (capped at 100). Pass countOnly to get the total without fetching rows — it is a real, exact SQL count (never an estimate), so it is the right tool for a dashboard total instead of paging through everything and counting client-side. countOnly accepts viewId and/or filters to count a scoped subset (e.g. "PRs on the main branch"); both require baseId. To find records by a field value use record_find_by_field; to search content use search or grep. A record page is { records, nextCursor }. nextCursor only means another page exists; pass it back as cursor and do not treat it as data. Each record's current business values live only in records[].headCommit.payload, keyed by field slug. Read that object. records and nextCursor are the page wrapper, not fields. Commit metadata (headCommit.id, author, message) and hydrated parents (base, createdByUser) are not field values. If a slug is absent from payload, the field is empty — do not invent it from the wrapper or from a sibling key.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "record_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | One-field sort, e.g. {"fieldSlug":"due","direction":"asc"}. Number and date fields sort on the server; other types come back in the default order. Needs baseId unless you pass fieldType; an unknown field is an error. | |
| limit | No | Page size, 1-100 (default 50). | |
| baseId | No | Restrict to one Base. Omit for the space. | |
| cursor | No | Opaque cursor from the previous page. | |
| viewId | No | countOnly only: count the rows this saved View displays. Requires baseId. Listing a View's rows is records.listPage (`busabase-cli records list-page`); passing viewId without countOnly is an error. | |
| filters | No | View filters pushed down to the server. With countOnly, requires baseId; not every filter is a cheap SQL count (see the records.count API description) but the result is always exact. | |
| playbook | No | Optional. The playbook you are following, as `kind:nodeId[:key]` from playbooks_search (e.g. `prompt:nod_123:log-visit`). Recorded on the change request so the person can see which playbook produced it. | |
| countOnly | No | Return the total instead of rows. | |
| targetSpaceId | No | Busabase space id. Call auth_verify first and ask the user which space to use when more than one is returned. |