sanity_count
Count documents in Sanity that match a specified GROQ filter, providing quick totals for content queries.
Instructions
Count documents matching a GROQ filter
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": {
"filter": "<filter>"
},
"name": "sanity_count"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | Yes | GROQ filter expression (e.g., "*[_type == 'post']") | |
| params | No | Optional parameters for the filter |