Count datastore records
count_recordsCounts exact records in a data.gov.il datastore resource matching a search or filters without downloading rows, and optionally breaks counts down by one field.
Instructions
Exact number of records in a data.gov.il datastore resource that match optional q/filters, without downloading rows (datastore_search with limit 0). Optional group_by counts records per value of one field (up to 25 values, e.g. manufacturers or roles from list_field_values) and returns each count, its share of the total and the remainder ("other").
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": {
"resource_id": "<resource_id>"
},
"name": "count_records"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Full-text search across the datastore | |
| filters | No | Exact-match field filters. A list means "any of these", e.g. { "tozeret_nm": ["טויוטה יפן", "מאזדה יפן"], "shnat_yitzur": 2026 } | |
| group_by | No | Optional breakdown, e.g. { "field": "tozeret_nm", "values": ["טויוטה יפן", "קיה קוריאה"] } | |
| resource_id | Yes | CKAN resource UUID with datastore_active=true |