Skip to main content
Glama

Count an audience

preview_whatsapp_campaign_audience
Read-only

Count an audience. Counts the contacts a label and filter audience would select, and how many of them could actually be messaged. Nothing is saved, so this works before a campaign exists. Imported CSV recipients are not part of this count. Audience labels are contact labels (the labels on contacts, not on conversations). Administrators only. Requires feature: whatsapp_campaigns.

Input Schema

NameRequiredDescriptionDefault
fieldsNoOptional: return only these fields of each record.
whatsapp_campaignNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the read-only/no-destructive profile, but the description adds substantially more: nothing is persisted, CSV recipients are excluded from the count, labels are contact labels not conversation labels, and access requires the admin role with the `whatsapp_campaigns` feature. Those permission and scope constraints are exactly the context annotations cannot express, and nothing contradicts readOnlyHint=true or destructiveHint=false.

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?

Short, front-loaded sentences with the core behavior first, then constraints. The opening 'Count an audience.' duplicates the title verbatim, which is a small redundancy, but the rest of the text is dense and earns its place.

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?

With no output schema, the description does convey what comes back (selected contacts and how many are messageable), and it covers auth/feature prerequisites. It does not explain the `selected`/`eligible`/`excluded` field semantics from the schema, but for a read-only count tool this is nearly complete.

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 50%, and the description's only parameter-relevant statement ('Audience labels are contact labels...') merely restates the schema's own label description. The `fields` parameter and the filter_query condition format are left entirely to the schema, so this meets the baseline without adding meaning.

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?

The description states a specific verb and resource ('Count an audience') and immediately expands it: it counts contacts a label+filter audience would select and how many could actually be messaged. This cleanly separates it from sibling preview_whatsapp_campaign (message preview) and list_whatsapp_campaign_recipients (per-recipient listing).

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

Usage Guidelines4/5

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

It gives clear usage context: 'Nothing is saved, so this works before a campaign exists', plus an explicit exclusion ('Imported CSV recipients are not part of this count'). It does not name an alternative tool to use instead, so it falls short of the 5-level when/alternatives guidance.

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