Skip to main content
Glama

Count CRM Objects

count_crm_objects
Read-only

How 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

NameRequiredDescriptionDefault
object_typesNoWhich objects to count. Omit for all five.
connection_idYesThe CRM connection to read. Required. Call list_crm_connections to get one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/openWorld/destructive annotations, it discloses the data source (a local mirror), cost (no CRM API calls, nothing spent), and side-effect profile (changes nothing). Most valuably it explains result semantics: an unsynced object returns synced=false and no count, which is not zero — a behavioral detail the annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then exclusions, then result-semantics caveat — a logical order with no filler sentences. The emphatic capitals ("NO FILTER") and fragments like "spends nothing, changes nothing" are slightly stylized but each carries distinct routing or cost information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With only two parameters, no output schema, and full annotation coverage, the remaining burden is result interpretation — and the description supplies it (synced=false means unread, not zero). Nothing an agent needs to call or report this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and both the default-omission rule for object_types and the connection_id lookup hint (list_crm_connections) already appear in the schema descriptions. The description reinforces 'omit object_types for all five' but adds no format or syntax detail beyond the structured fields, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (count) and resource (CRM objects), plus the exact scope: all five object types in one call. It explicitly separates itself from count_crm_records by contrast (unfiltered overview vs. single-object filter), so an agent can pick without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives when-to-use ("what is in my CRM", "how big is our Salesforce"), when-not ("NO FILTER" questions like 'how many contacts have no mobile phone'), and names the alternative count_crm_records. It also forbids the common wrong pattern of looping count_crm_records per object.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.