Skip to main content
Glama

MyDataHub

Count an audience

count_audience
Read-onlyIdempotent

Counts UK contacts and companies matching an audience, inline or a saved aud_ id, and returns Total, New to you and Emailable, up to three breakdowns, quality, the compliance summary, a price estimate and a count id. Use it whenever a filter changes, and before preview_records or quote_order, which both take the count id. Free and needs no account; anonymous and trial callers see counts under 100 and breakdown cells rounded to the nearest 5 (disclosure says which), and exact small counts need a paid plan. It returns no contact details, and over MCP a cross-tab holds at most 200 cells (truncated true; GET /v1/counts/{id} has the rest). Lawful basis is UK GDPR Article 6(1)(f) legitimate interests; email audiences include corporate subscribers only by default (PECR), so sole traders and ordinary partnerships are left out unless the toggle is changed.

Input Schema

NameRequiredDescriptionDefault
levelNocontact (the default) or company. Contacts and companies come back together either way.contact
audienceYes
breakdown_byNoUp to three fields to break the count down by, each once, such as industry by seniority by region. Returns the top 50 cells per field plus other.

Output Schema

NameRequiredDescriptionDefault
idYesFormat: a count id: cnt_ followed by 20 base32 characters (A to Z and 2 to 7), such as cnt_7K2PQ4MAXN3R6TBY5WDZ.
planNo
as_ofNoThe date the dataset version was built, for as-of statements.
levelNocontact (the default) or company. Contacts and companies come back together either way.
viewsNo
currentNoOn a replay: the same audience on the current dataset version.
datasetYesThe dataset an audience draws from. uk_contacts is live; ie_contacts and global_contacts are listed but not yet served.
premiumYesPremium: the contacts of all_records that are premium records (contact.premium true). At launch, a premium record is in the premium export of a stated date. Null when the dataset version carries no premium data, or withheld when the premium records are at a single company and the caller has no account; premium_note says which.
qualityYes
contactsYesTotal: every matching contact.
crosstabNo
defaultsYesEvery default with the number behind its toggle: dissolved and insolvent, generic emails, individual subscribers, TPS and CTPS registered.
estimateYes
warningsNo
companiesYes
emailableYesA named email scoring 70 or more at a corporate subscriber.
breakdownsYes
created_atNo
disclosureYes
expires_atYesThe id replays until then (12 months).
new_to_youYesExcludes your earlier orders and CRM overlap; null when signed out.
all_recordsYesAll records: every matching contact with the audience's top-level premium filters taken out (a premium filter inside any or not stays), so the premium figure always has the full figure beside it. The same as contacts when the audience has no premium filter.
premium_noteYesWhat premium means on this dataset version, or why premium is null: no premium data on the version, or withheld because the premium records are at a single company.
removed_sinceNoOn a replay: records since removed by objections and erasure.
expanded_termsNoEvery title a matches filter covered, with a count per term.
dataset_versionYesThe immutable weekly build a count is bound to, such as 2026-W39. The last 52 stay queryable.
compliance_summaryYes
credits_per_recordYesCredits, to one decimal place: whole at 1 credit a record, fractional only where a rule is (0.1 company-only, 1.8 outright, both proposed).
effective_audienceNoThe definition after defaults and bundles, as hashed into the id.
engine_rules_versionYesThe engine rules (title expansion, defaults, geography sets) the count ran under; part of what the count id hashes, such as 2026.09.1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: free and account-free, anonymous/trial callers capped at counts under 100 with breakdown cells rounded to the nearest 5, exact small counts gated behind a paid plan, and a disclosure field indicating which regime applied. It also discloses that no contact details are returned, that MCP cross-tabs truncate at 200 cells with GET /v1/counts/{id} holding the remainder, and the Article 6(1)(f) / PECR corporate-subscriber default. Nothing contradicts readOnly/idempotent/non-destructive.

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-loads purpose and return values before the caveats, and every clause carries non-obvious information. It is a dense single paragraph, though, mixing pricing, rounding, truncation and legal basis into one block rather than separating operational limits from compliance context.

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?

For a free, read-only counting tool with an output schema available, the description still covers the things an agent cannot infer: cost, plan-dependent precision, truncation behavior and the lawful-basis/email-policy default. An agent can decide to call it, chain it into preview_records/quote_order, and set expectations for the response without consulting anything else.

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?

Adds real meaning beyond the 67%-covered schema: the audience argument can be an inline definition or a saved aud_ id, and breakdown_by is capped at three fields returning top 50 cells plus 'other'. The level parameter is only implicitly covered ('UK contacts and companies ... Contacts and companies come back together'), leaving a small gap.

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 and resource ('Counts UK contacts and companies matching an audience') plus the accepted audience forms (inline definition or saved aud_ id). It also enumerates what comes back (Total, New to you, Emailable, breakdowns, quality, compliance summary, price estimate, count id), which separates it from siblings like get_count or preview_records.

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?

Gives explicit timing guidance ('Use it whenever a filter changes') and names two downstream consumers, preview_records and quote_order, that depend on the returned count id, so sequencing is unambiguous. What it lacks is any when-not guidance, e.g. when to use get_count to re-fetch an existing count instead of recomputing.

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