Skip to main content
Glama

Preview Audience segment

preview_audience_segment
Read-onlyIdempotent

Count how many subscribers match a set of filters, without listing them. Columns: type (is, is_not, is_any_of); started_at (on, before, after); activity (gt, gte, lt, lte, is, is_not). Each column at most once; combine Type values with is_any_of. Returns the count and a plain-language rule. Never returns subscribers or emails. Workspace owner only, on a plan that includes agents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceNoOptional authorized team workspace name or id. Absence selects the authenticated user’s personal account. Audience is for the workspace owner only.
predicatesYesFilters, all of which must match.
includeAuthorNoInclude the publication’s own author in the count. Defaults to false.
publicationIdNoOptional connected Substack publication: its id, handle, URL, or name. Defaults to the default publication, or the only one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
lastSyncYes
exclusionsYes
completenessYes
predicateHashYes
publicationIdYes
interpretedRuleYes
connectedAccountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, so the description adds genuine extra context: the output is a count plus a plain-language rule, subscriber identities are never exposed, and there are auth/plan prerequisites. That is exactly the kind of information annotations cannot express.

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?

The core behavior and output shape come first, followed by the operator table, structural constraints, privacy guarantee, and auth requirements. Every sentence is terse and load-bearing, with no repetition of the schema.

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 4-parameter read tool with an output schema, everything an agent needs is present: what is counted, what is returned, what is never returned, filter combination rules, and permission/plan prerequisites. The maxItems and includeAuthor details are adequately handled by the schema itself.

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% and each parameter is documented, so the baseline is 3. The description goes beyond that by enumerating the valid operators per column (is/is_not/is_any_of, on/before/after, gt/gte/lt/lte/is/is_not) and the one-column-once constraint, which compensates for the schema delegating operator enumeration to get_audience_overview.

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 ('Count how many subscribers match a set of filters') and immediately bounds the scope with 'without listing them'. The description also distinguishes the output from listing-style siblings by saying it never returns subscribers or emails.

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 clear operating context: workspace-owner-only permission, a required plan that includes agents, and structural rules ('Each column at most once'). It does not explicitly name a sibling to use instead for listing subscribers or for browsing the audience, so the when-not case is only implied by 'without listing them'.

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