Skip to main content
Glama

TextKit

Query audience

query_audience
Destructive

Count a cohort without saving anything (nothing appears in the console): run up to 10 segment rules now and get the counts (matched, opted out, eligible to text) and the first contacts. Examples: replied in the last 7 days (last_reply_at after 7d); got a batch and did not reply (batch sent, and batch replied with is_not); started checkout but never purchased (event exists, event not_exists); VIPs not texted in 30 days. Same rule fields as a saved segment. Everyone eligible to text: one rule, status is subscribed.

Input Schema

NameRequiredDescriptionDefault
limitNoHow many matching contacts to return
matchNoall
rulesNo
topic_idNoTopic id or name: eligible also removes contacts unsubscribed from it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior2/5

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

The description is rich on its own terms: it caps rules at 10, discloses that only the newest 20,000 events are searched, and explains that relative windows like 7d are re-read on each use (hence non-idempotent). But it insists the tool 'saves nothing' and just counts, while the annotations declare readOnlyHint=false and destructiveHint=true, so an agent gets conflicting signals about side effects.

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?

The no-saving constraint is front-loaded in the first clause, followed by the rule cap and return shape, then examples. It is dense but every clause carries information; the only mild bloat is the parenthetical console remark.

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?

There is no output schema, so the description correctly names what comes back (matched, opted out, eligible-to-text counts plus the first contacts). Gaps remain around the return structure (single object vs. list), why the tool is flagged destructive, and how it relates to preview_segment, but for a filtered-count tool it is largely sufficient.

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 50%, so the description must compensate, and it does — the worked examples spell out the rule recipe pattern (field + op + value) and show edge cases such as 'batch replied with is_not' and 'event not_exists'. The 'everyone eligible to text' example even teaches the topic_id/status interaction indirectly, though limit and match are left entirely to the schema.

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?

The opening sentence states a specific verb and resource ('Count a cohort without saving anything') and explicitly contrasts itself with a saved segment ('nothing appears in the console', 'Same rule fields as a saved segment'), which is the key distinction an agent needs. It never names the sibling tool 'preview_segment', however, so the agent cannot tell from this text how the two audience-previewing tools differ.

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?

Four concrete, common scenarios (replied in the last 7 days; got a batch and did not reply; started checkout but never purchased; VIPs not texted in 30 days) show clearly when this tool is the right call. What is missing is any negative guidance: when to use preview_segment, create_segment, or list_contacts instead, and whether prerequisites exist.

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