Count CRM Objects
count_crm_objectsHow many records of EACH object this connection holds -- accounts, contacts, leads, opportunities, cases -- in ONE call. For an overview a PERSON asked: 'what is in my CRM', 'how big is our Salesforce'. Reads a local mirror, calls no CRM API, spends nothing, changes nothing. Omit object_types for all five. NO FILTER. For a filtered question -- 'how many contacts have no mobile phone' -- use count_crm_records, which takes one object and a filter. Do not call count_crm_records once per object to build an overview; this answers it whole. An object the connection has not synced comes back with synced false and no count. That is not zero: say it has not been read, not that there are none.
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": {
"connection_id": "<connection_id>"
},
"name": "count_crm_objects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object_types | No | Which objects to count. Omit for all five. | |
| connection_id | Yes | The CRM connection to read. Required. Call list_crm_connections to get one. |