Count records
odoo_countCount records of a specified Odoo model that match a domain and return the model name with the total. Use it when you need only the number and do not want to retrieve records.
Instructions
Count the records of one model that match a domain and return {model, count}. Use it when you need only the number: it reads no records, so it is cheaper than odoo_search. Without a domain it counts every record you can see, archived ones excluded. For counts per group use odoo_aggregate with '__count'; to get the records use odoo_search.
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": {
"model": "<model>"
},
"name": "odoo_count"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Technical model name from odoo_list_models, e.g. 'res.partner' or 'sale.order'. | |
| domain | No | Odoo domain: a list of [field, operator, value] conditions, combined with AND unless prefixed by '|' (OR) or '!' (NOT). A dotted path follows a relation to another available model, e.g. 'country_id.code'. Omit or [] to match every record you can see; archived records are left out unless the domain has a condition on active. Example: [["customer_rank", ">", 0], ["country_id.code", "=", "BE"]]. |