Skip to main content
Glama

Preview Saved Integration Segment

preview_saved_integration_segment
Read-onlyIdempotent

Preview exact unique identities, duplicate receipts, expiry/privacy exclusions, existing overlap, and net additions before creating or extending a segment. This performs no mutation and records no usage. Requires 'discovery' scope.

Input Schema

NameRequiredDescriptionDefault
filtersNoOptional provider, connection, run, source-kind, and time-window filters
target_segment_idNoOptional existing matched segment for overlap and net-addition counts

Output Schema

NameRequiredDescriptionDefault
previewYes
guidanceNoInterpretation or recovery guidance for this result
cutoff_atYes
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_actionsNoSuggested next calls using returned IDs and available scopes. Not executed and not user consent.
money_displayNoCurrency amounts formatted once from source paths ending in _cents. Use verbatim; do not divide again. Null/missing source amounts are omitted, not zero.
population_inputNoPopulation input used for the preview; IDs refer to their current saved definitions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "count_state": {
      +      "description": "Unknown means no count; available does not guarantee freshness. Recount for a current value.",
      +      "enum": [
      +        "unknown",
      +        "available"
      +      ],
      +      "type": "string"
      +    },
      +    "count_unit": {
      +      "const": "records",
      +      "type": "string"
      +    },
      +    "cutoff_at": {
      +      "type": "string"
      +    },
      +    "guidance": {
      +      "description": "Interpretation or recovery guidance for this result",
      +      "type": "string"
      +    },
      +    "money_display": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "description": "Currency amounts formatted once from source paths ending in _cents. Use verbatim; do not divide again. Null/missing source amounts are omitted, not zero.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "next_actions": {
      +      "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"
      +    },
      +    "page_count": {
      +      "description": "Number of objects on this page, not the organization total",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "population_input": {
      +      "additionalProperties": {},
      +      "description": "Population input used for the preview; IDs refer to their current saved definitions",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "preview": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "already_present": {
      +          "type": "number"
      +        },
      +        "duplicate_observations": {
      +          "type": "number"
      +        },
      +        "expired_identities": {
      +          "type": "number"
      +        },
      +        "net_additions": {
      +          "type": "number"
      +        },
      +        "source_observations": {
      +          "type": "number"
      +        },
      +        "suppressed_identities": {
      +          "type": "number"
      +        },
      +        "unique_identities": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "source_observations",
      +        "unique_identities",
      +        "duplicate_observations",
      +        "expired_identities",
      +        "suppressed_identities",
      +        "already_present",
      +        "net_additions"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "cutoff_at",
      +    "preview"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/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 covered. The description adds genuinely new operational context beyond them: 'records no usage' (cost/quota behavior) and "Requires 'discovery' scope" (an auth prerequisite the agent cannot infer from the schema). It stops short of noting latency or result-size expectations for a preview over large filter sets.

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 with zero filler; the enumerated outputs are front-loaded and the scope prerequisite is placed last where it reads as a gate. Every clause earns its place.

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 not be explained, and the description covers the mutation-free guarantee plus the required scope. Slightly incomplete in that it never clarifies how the preview result relates to the eventual build (e.g., whether counts are guaranteed identical at build time).

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% with only 2 parameters, both described in the schema (filters and target_segment_id), so the schema carries the semantics. The description adds no detail about filter composition, time-window semantics, or how target_segment_id changes the overlap calculation, so 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?

States a specific verb (Preview) and a specific resource (saved integration segment), then enumerates the exact outputs produced: unique identities, duplicate receipts, expiry/privacy exclusions, overlap, net additions. The phrase 'before creating or extending a segment' distinguishes it from the mutating sibling build_saved_integration_segment without needing to open either schema.

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?

'before creating or extending a segment' gives a clear decision point for when to reach for this tool. It does not explicitly name build_saved_integration_segment as the alternative, so the routing is implied by lifecycle position 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.

Resources