Skip to main content
Glama
This connector has been deprecated

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

List Segments

list_segments
Read-onlyIdempotent

List a page of visible, non-archived saved segments with subtype, status, and record counts. Use when the user asks what segments they have; filter by subtype or pass a limit of 1–100. For one complete definition, call get_segment with its segment_id. Requires 'discovery' scope.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_segments"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of segments to return (default 10; maximum 100)
cursorNonext_cursor from a previous response
compactNoReturn small summaries by default. Set false to include saved filter_groups on filter segments; get_segment retrieves one complete definition.
subtypeNoOptional: filter results to a specific segment subtype; custom is materialized membership published by the data team.
include_archivedNoInclude archived objects so they can be found and restored

Output Schema

NameRequiredDescriptionDefault
totalYesNumber of segments on this page
guidanceNoInterpretation or recovery guidance for this result
segmentsYesSaved segment summaries
count_unitNo
page_countNoNumber of objects on this page, not the organization total
count_stateNoUnknown means no count; available does not guarantee freshness. Recount for a current value.
next_cursorYesCursor for the next page, or null
next_actionsNoSuggested next calls using returned IDs and available scopes. Not executed and not user consent.
population_inputNoPopulation input used for the preview; IDs refer to their current saved definitions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": true,
      +  "description": "Return small summaries by default. Set false to include saved filter_groups on filter segments; get_segment retrieves one complete definition.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "next_cursor from a previous response",
      +  "type": "string"
      +}
    • addedInput schema / properties / include_archived
      Added value: +{
      +  "description": "Include archived objects so they can be found and restored",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit / default
      Added value: +10
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of segments to return (default 50; REST maximum 100)"New value: +"Maximum number of segments to return (default 10; maximum 100)"
    • changedInput schema / properties / subtype / description
      Previous value: -"Optional: filter results to a specific segment subtype ('filter', 'matched', 'similarity', 'propensity')"New value: +"Optional: filter results to a specific segment subtype; custom is materialized membership published by the data team."
    • changedInput schema / properties / subtype / enum
      Previous value: -[
      -  "filter",
      -  "matched",
      -  "similarity",
      -  "propensity"
      -]New value: +[
      +  "filter",
      +  "matched",
      +  "custom"
      +]
    • 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 / 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"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "next_cursor": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Cursor for the next page, or null"
      +    },
      +    "segments": {
      +      "description": "Saved segment summaries",
      +      "items": {
      +        "additionalProperties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total": {
      +      "description": "Number of segments on this page",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "segments",
      +    "total",
      +    "next_cursor"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and non-destructive, so the safety profile is covered; the description adds the genuinely useful 'Requires discovery scope' auth requirement and the default visibility/archival scoping. It does not explain the pagination contract (cursor round-trip) beyond the phrase 'a page', which is left to the schema.

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?

Three short sentences, front-loaded with what is returned, then usage, then the alternative. No filler and no repetition of the title.

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?

With an output schema present, return-value detail is not required, and annotations plus the schema cover safety and parameters. The only small gap is that the description asserts 'non-archived' without acknowledging the include_archived override, which could momentarily confuse an agent reading only the prose.

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 every parameter is already documented, and the description largely restates what the schema says (subtype filter, limit 1–100). The 'compact' and 'include_archived' parameters get no added meaning in the description, so the baseline 3 applies.

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 verb and resource ('List a page of visible, non-archived saved segments') and names the fields returned (subtype, status, record counts). It is immediately distinguishable from the sibling get_segment, which is called out for the single-definition case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit trigger ('Use when the user asks what segments they have'), explicit refinement options (filter by subtype, limit 1–100), and routes the alternative case to get_segment with segment_id. When-to-use and when-to-use-something-else are both covered.

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