Skip to main content
Glama

Metadata MCP Connector

Get Segment Criteria

get_segment_criteria
Read-only

Read one saved Insights segment by id or name: its criteria, status, and how many accounts it matches. Pass lookback_window to count inside the window an audience would use.

RETURNS {found: true, id, name, status, last_updated_date, lookback_window, accounts, criteria}, or {found: false, available_segments: [...]} when nothing matches: pick from that list or create_segment, never invent an id.

STATUS: READY (usable), PENDING (a CRM field is still being extracted: wait and re-check), FAILED.

accounts is the number of companies matching right now (all time when lookback_window is omitted). 0 with the window you plan to use means create_audience_from_segment would build an empty audience: loosen the criteria (a new create_segment) or widen the window first.

Pass the returned criteria object (not the id) to get_insights_report to list the accounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
segment_idNoSegment ID (fastest lookup).
segment_nameNoSegment name (fuzzy matching, case-insensitive).
lookback_windowNoDays to evaluate the segment over when counting accounts; use the window the audience will be created with.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only indicate read-only and non-destructive behavior. The description goes well beyond that by specifying the exact return contract for both found and not-found cases, interpreting statuses (READY/PENDING/FAILED), and explaining the meaning of accounts with and without lookback_window. It also surfaces the actionable implication of a zero count for create_audience_from_segment. No contradiction with readOnlyHint.

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 description is organized into tight functional sections: RETURNS, STATUS, accounts semantics, and downstream guidance. Every sentence contributes operational value, with no filler or repetition of the schema. The use of concrete return shapes and warning notes makes the longer format worthwhile.

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?

Given that there is no output schema, the description fully specifies the return shape for both success and not-found cases, explains all status values, and defines the account count behavior. It also covers edge cases such as zero matches and tells the agent exactly how to proceed with sibling tools. An agent has everything needed to invoke and interpret this tool correctly.

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?

The schema already documents all three parameters with 100% coverage, so the baseline is 3. The description adds useful meaning beyond the schema by clarifying that omitting lookback_window yields all-time counts and that a zero count with the planned window signals an empty audience. This extra context about parameter behavior justifies a 4.

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?

The description states a specific action and resource: 'Read one saved Insights segment by id or name.' It also enumerates exactly what is returned—criteria, status, and account match count—which clearly distinguishes it from siblings like list_segments or create_segment. There is no tautology or ambiguity.

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?

The description clearly communicates the primary use case and gives explicit fallback guidance: if not found, pick from available_segments or call create_segment, and never invent an id. It also provides decision rules for zero account counts and downstream usage with get_insights_report. It does not explicitly name list_segments as the alternative for enumerating all segments, but the 'read one' framing makes the intended scope clear.

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