Skip to main content
Glama

Count contacts

count_contacts
Read-onlyIdempotent

How many contacts match a search, segment, product or email status (all contacts when none is given).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchNoName or email contains this.
productIdNoOnly this product's contacts (from list_products).
segmentIdNoOnly people in this segment (from list_segments).
emailStatusNoOnly contacts with this email status.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is fully covered. The description adds one genuinely useful behavioral fact: the no-filter case counts the entire contact base. It says nothing about cost, latency or result precision on a large workspace.

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?

A single sentence, front-loaded with the verb and scope, with the default behavior in a compact parenthetical. No filler and nothing an agent must skip past.

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

Completeness4/5

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

For a filterable count tool with zero required params, 100% schema coverage and no output schema, the description covers the essential ambiguity (what happens with no filters). Minor gaps remain: it does not state that it returns a single integer or how multiple filters combine.

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 description coverage is 100%, so every parameter (search, productId, segmentId, emailStatus with its enum) is already documented, including where IDs come from. The description's enumeration of 'search, segment, product or email status' merely restates those same axes without adding format or combination semantics (e.g. whether filters AND together).

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

Purpose4/5

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

States a specific verb (count) and resource (contacts) with the filter axes spelled out, so the agent immediately knows this returns a number rather than records. It does not name the sibling it competes with (search_contacts, count_duplicate_contacts), so the differentiation is implied rather than stated.

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

Usage Guidelines3/5

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

Usage is implied by the verb — use this when you need a count rather than the contacts themselves — and it clarifies the no-filter default ('all contacts when none is given'). However, it never says when to prefer count_contacts over search_contacts or count_duplicate_contacts, and lists no prerequisites or exclusions.

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.

Resources