Skip to main content
Glama

Count Segment Contacts

count_segment_contacts
Read-onlyIdempotent

Counts the contacts matching one segment of the signed-in Mailpro account, optionally restricted to one contact list. This is the audience a campaign sent to that segment would reach.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "segment_id": "<segment_id>"
    },
    "name": "count_segment_contacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
list_idNoOptional: count only inside this contact list. 0 for the whole account.
segment_idYesSegment id, from list_segments.

Output Schema

NameRequiredDescriptionDefault
list_idYes0 when counted on the whole account.
contactsYes
segment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds genuine meaning beyond that: the count is account-scoped, can be narrowed to a single list, and represents the reachable audience for a segment-targeted campaign. It omits any note on cost, rate limits, or whether results are eventually consistent, which keeps it from a 5.

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?

Two sentences with no filler, front-loaded with the action and scope before the interpretive note. Every clause carries information an agent would not get from the name alone.

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?

An output schema exists, so return values need no explanation, and the two-parameter surface is simple. The definition is adequate, but it leaves one real ambiguity: whether list_id must match the segment's own list or can narrow across lists without changing the count.

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 both parameters are already documented, including list_id's 0-means-whole-account convention. The description's 'optionally restricted to one contact list' restates the schema rather than adding format, constraint, or interaction detail; baseline 3 applies.

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 description opens with a specific verb and resource ('Counts the contacts matching one segment') plus the scope ('of the signed-in Mailpro account'), so the agent knows exactly what the tool returns. It also implicitly separates itself from contact-returning siblings by framing the result as a count/audience size, though it never names an alternative outright.

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 only implied through 'This is the audience a campaign sent to that segment would reach', which hints at a pre-send audience-size check without stating when to use this over search_contacts or list_segments. There are no explicit exclusions or prerequisites, leaving the agent to infer the selection condition.

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