Skip to main content
Glama
This connector has been deprecated

Replaced by io.github.no-fait/infinite-audience

Get Segment

get_segment
Idempotent

Fetch one segment by segment_id. Returns its customer-facing subtype, status, count, and subtype-specific fields. Filter segments include the complete filter_groups definition and current_version; matched and model-generated segments expose their own relevant fields. An expired segment may have its stored status synchronized to expired during this read; no build or count is started. Requires 'discovery' scope.

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": "get_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
segment_idYesThe segment ID to retrieve

Output Schema

NameRequiredDescriptionDefault
nameYes
statusYes
subtypeYes
guidanceNoInterpretation or recovery guidance for this result
count_unitNo
page_countNoNumber of objects on this page, not the organization total
segment_idYes
count_stateNoUnknown means no count; available does not guarantee freshness. Recount for a current value.
next_actionsNoSuggested next calls using returned IDs and available scopes. Not executed and not user consent.
record_countNoStored count; null means unknown. Call count_segment for a current count.
record_limitNoMaximum members; null means no explicit cap
filter_groupsNoComplete saved filter definition; one AND group also represents a simple flat filter list
current_versionNo
population_inputNoPopulation input used for the preview; IDs refer to their current saved definitions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedOutput schema / properties / count_state
      Added value: +{
      +  "description": "Unknown means no count; available does not guarantee freshness. Recount for a current value.",
      +  "enum": [
      +    "unknown",
      +    "available"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / count_unit
      Added value: +{
      +  "const": "records",
      +  "type": "string"
      +}
    • addedOutput schema / properties / current_version
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / filter_groups
      Added value: +{
      +  "description": "Complete saved filter definition; one AND group also represents a simple flat filter list",
      +  "items": {
      +    "additionalProperties": {},
      +    "properties": {
      +      "combinator": {
      +        "description": "Join to the preceding included group; ignored for the first group. AND binds before OR. Exclusion groups always subtract.",
      +        "enum": [
      +          "AND",
      +          "OR"
      +        ],
      +        "type": "string"
      +      },
      +      "filters": {
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "field": {
      +              "description": "field_name from get_field_catalog; ZIP5 also accepts zip, zip_code or postal_code. Use published operators and enum_values",
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "op": {
      +              "enum": [
      +                "=",
      +                "!=",
      +                "<",
      +                "<=",
      +                ">",
      +                ">=",
      +                "IN",
      +                "NOT IN",
      +                "BETWEEN",
      +                "LIKE",
      +                "ARRAY_CONTAINS",
      +                "ARRAY_CONTAINS_ANY",
      +                "IS NULL",
      +                "IS NOT NULL"
      +              ],
      +              "type": "string"
      +            },
      +            "text_comparison": {
      +              "description": "STRING =, !=, IN, NOT IN, LIKE and ARRAY<STRING> ARRAY_CONTAINS, ARRAY_CONTAINS_ANY. Default exact. case_insensitive applies Unicode case folding to stored text and the supplied value; use when capitalization is incidental.",
      +              "enum": [
      +                "exact",
      +                "case_insensitive"
      +              ],
      +              "type": "string"
      +            },
      +            "trim_whitespace": {
      +              "description": "Supported STRING or ARRAY<STRING> comparisons only. Trim leading/trailing whitespace on both sides; default false.",
      +              "type": "boolean"
      +            },
      +            "value": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "boolean"
      +                },
      +                {
      +                  "items": {
      +                    "anyOf": [
      +                      {
      +                        "type": "string"
      +                      },
      +                      {
      +                        "type": "number"
      +                      },
      +                      {
      +                        "type": "boolean"
      +                      }
      +                    ]
      +                  },
      +                  "type": "array"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Scalar for comparisons; array for IN/NOT IN; ARRAY_CONTAINS_ANY matches any listed value; [lower, upper] inclusive for BETWEEN; LIKE uses % for any sequence and _ for one character; omit for IS NULL/IS NOT NULL. Use enum_values codes, not display labels"
      +            }
      +          },
      +          "required": [
      +            "field",
      +            "op"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "id": {
      +        "description": "Caller-chosen group ID, for example geography; prefix _exclude:: to subtract this group",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "combinator",
      +      "filters"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / guidance
      Added value: +{
      +  "description": "Interpretation or recovery guidance for this result",
      +  "type": "string"
      +}
    • addedOutput schema / properties / next_actions
      Added value: +{
      +  "description": "Suggested next calls using returned IDs and available scopes. Not executed and not user consent.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "arguments": {
      +        "additionalProperties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "reason": {
      +        "type": "string"
      +      },
      +      "tool": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "tool",
      +      "arguments",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / page_count
      Added value: +{
      +  "description": "Number of objects on this page, not the organization total",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / population_input
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Population input used for the preview; IDs refer to their current saved definitions",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / record_count
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Stored count; null means unknown. Call count_segment for a current count."
      +}
    • addedOutput schema / properties / record_limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Maximum members; null means no explicit cap"
      +}
    • changedOutput schema / properties / subtype / enum
      Previous value: -[
      -  "filter",
      -  "matched",
      -  "similarity",
      -  "propensity"
      -]New value: +[
      +  "filter",
      +  "matched",
      +  "custom"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "name": {
      +      "type": "string"
      +    },
      +    "segment_id": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "subtype": {
      +      "enum": [
      +        "filter",
      +        "matched",
      +        "similarity",
      +        "propensity"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "segment_id",
      +    "name",
      +    "subtype",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Discloses a genuine side effect beyond the annotations: an expired segment's stored status may be synchronized to expired during the read, and no build or count is triggered. This usefully explains the readOnlyHint=false annotation rather than contradicting it, and names the required 'discovery' scope. The only gap is that the response shape and any error conditions are not characterized.

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?

Front-loads the core action in the first sentence, then layers return content, subtype-specific behavior, the read side effect, and scope requirements in a tight sequence. No sentence is redundant.

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?

Covers the action, the return categories, per-subtype variation, side effects, and the authorization scope needed. With an output schema present, return fields need no further elaboration, so nothing an agent needs to call this correctly is missing.

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?

There is a single parameter with 100% schema description coverage, so the schema already documents segment_id. The description adds nothing about ID format or source beyond restating 'by segment_id'; 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?

States a specific verb and resource ('Fetch one segment by segment_id') and enumerates what comes back (subtype, status, count, subtype-specific fields). It is clearly distinguishable from list_segments or count_segment by its single-ID scope, though it never names those siblings explicitly.

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 implied by the singular 'by segment_id' phrasing, which signals bulk listing is elsewhere. There is no explicit when-to-use/when-not guidance and no pointer to alternatives such as count_segment if only a count is needed, or get_segment_demographics for breakdowns.

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