Skip to main content
Glama
agentreadycrm

agentreadycrm

Official

Count Records

count_records
Read-onlyIdempotent

Count contacts, organizations, or deals by field values, most common first, with optional filters to show how a workspace divides by audience, fit, stage, or industry.

Instructions

Count contacts, organizations or deals by one field's values, most common first.

Call it to see how a workspace divides without walking it: how many contacts per audience or email status, how many organizations per fit, how many open deals per stage. It takes the same filter as the list tools, so it also answers "of the strong-fit companies, how many per industry". Deals count open ones only, unless the filter names stage or outcome. To read the records behind a value, use the list tool with a filter on it.

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": {
      "entity": "<entity>",
      "field": "<field>"
    },
    "name": "count_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldYesThe field path to count by (list_fields lists them). Not a timestamp.
limitNoHow many values to return (default 25, at most 100).
entityYesWhat to count.
filterNoRows to keep, as {"field": path, "op": op, "value": v}, or {"and": [...]} / {"or": [...]} of those. The server instructions list the operators for each field type; list_fields lists the paths.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent safety, but the description adds behavior those annotations cannot express: results are ordered most-common-first, and deals default to open-only unless the filter names stage or outcome. That default is a genuine semantic trap an agent would otherwise get wrong, and it is disclosed plainly.

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

Conciseness5/5

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

Front-loaded with the verb and ordering, then usage, then the deals caveat, then the routing sentence. Every sentence carries distinct information; nothing is redundant with the schema or annotations.

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 an output schema present, return values need no explanation, and annotations cover safety. The description supplies the remaining ambiguities: ordering, the deals open-only default, and filter parity with the list tools.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description earns more by explaining that 'filter' is the same filter used by the list tools and by showing a composite example ('of the strong-fit companies, how many per industry') that clarifies how filter composes with field. The field-not-a-timestamp constraint merely restates the schema.

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?

Opens with a specific verb and resource set ('Count contacts, organizations or deals by one field's values') plus the result ordering ('most common first'), which immediately separates it from the list_* siblings that return rows rather than aggregates.

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?

States the use case ('see how a workspace divides without walking it'), gives concrete instances (contacts per audience, orgs per fit, open deals per stage), and explicitly names the alternative and its condition: use the list tool with a filter to read the records behind a value.

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