count_records
Count the total records in an account's collection (e.g. how many likes a user has given). Scans server-side so you don't page manually. AT Protocol has no cheap exact count, so for very large collections this returns exact:false with a lower-bound count and a cursor,call again with that cursor and ADD the counts to keep going.
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": {
"repo": "<repo>",
"collection": "<collection>"
},
"name": "count_records"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | A handle or DID. | |
| cursor | No | Resume cursor from a prior capped (exact:false) count. The new count covers records AFTER it,add it to your previous total. | |
| collection | Yes | Collection NSID, e.g. app.bsky.feed.like. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||