count_repos_by_collection
Count how many accounts across the network publish a given collection/lexicon,e.g. 'how many accounts have an at.glean.subscription?'. Walks a relay's com.atproto.sync.listReposByCollection with NO per-account handle resolution, so it's cheap and returns an exact total for typical collections. For very large collections it returns exact:false with a cursor,call again with that cursor and ADD the counts (like count_records). Relay-served (defaults to the public Bluesky relay; pass relay for another).
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": "count_repos_by_collection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| relay | No | Optional relay origin to query instead of the default, e.g. https://relay.example.com. | |
| cursor | No | Resume cursor from a previous exact:false response. | |
| collection | Yes | A collection NSID, e.g. app.bsky.feed.generator. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||