Skip to main content
Glama

Preview segment

preview_segment
Read-onlyIdempotent

Count the contacts a segment matches right now and how many a broadcast would reach (opted-out contacts removed, and with topic_id those unsubscribed from it). notes says when an event rule names an event never tracked.

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": {
      "id": "<id>"
    },
    "name": "preview_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesSegment id
topic_idNoCount only contacts subscribed to this topic

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. The description adds real behavioral value beyond them: the count is a live snapshot, opt-outs are removed, topic_id further subtracts topic unsubscribes, and the `notes` field surfaces rules referencing never-tracked events.

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?

Two sentences, front-loaded with the core count behavior and free of filler. The trailing `notes` sentence is dense and slightly awkward in phrasing ('when an event rule names an event never tracked') but carries real information about an otherwise undocumented output field.

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 carries the return-value burden, and it does name both counts plus the `notes` diagnostic. It stops short of describing the shape of the response (field names, units), which would be needed for a perfect score on a read-only preview tool.

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%, so baseline is 3, but the description goes further by explaining the effect of topic_id on the resulting counts (removes topic unsubscribes), not just what it filters. The `notes` mention also documents a return field that the schema cannot express.

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 (count) on a specific resource (contacts matched by a segment) and specifies both figures returned: raw segment match and deliverable broadcast reach. That clearly separates it from get_segment (fetch definition) and list_segments (enumerate), even though no sibling is named.

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?

The framing 'how many a broadcast would reach' implies the pre-send sizing use case, but the description never says when to call this versus get_segment, query_audience, or preview_automation, and gives no exclusions or prerequisites. Usage is inferable rather than stated.

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.