Skip to main content
Glama
This connector has been deprecated

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

Build Segment from Saved Integration Matches

build_saved_integration_segment
Destructive

Create a matched segment, or add unique saved identities to a compatible standalone matched segment. Call preview_saved_integration_segment first and confirm the exact counts and target with the user. Adding to an existing segment replaces its current version. Completion or failure may notify configured external webhooks and opted-in users by email. Reuses previously resolved identities and returns a segment for subsequent audience composition. Requires 'creator' 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": {
      "mode": "<mode>"
    },
    "name": "build_saved_integration_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesCreate a new matched segment or add identities to an existing one
filtersNoSelect saved matches by provider, connection, run, source kind, or time window
request_idNoStable idempotency key; generated when omitted
segment_nameNoName for a new matched segment
target_segment_idNoExisting matched segment ID when mode is add_to_segment

Output Schema

NameRequiredDescriptionDefault
modeYes
statusYes
previewYes
guidanceNoInterpretation or recovery guidance for this result
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.
failure_codeYes
next_actionsNoSuggested next calls using returned IDs and available scopes. Not executed and not user consent.
collection_idYes
identity_countYes
failure_messageYes
population_inputNoPopulation input used for the preview; IDs refer to their current saved definitions
target_segment_idYes
materialization_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, openWorldHint=true, idempotentHint=false) it discloses that adding to an existing segment replaces its current version, that completion or failure may fire external webhooks and user emails, and that 'creator' scope is required. These are exactly the side effects and permissions an agent needs before committing a destructive write.

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?

Five short sentences with no padding: capability first, prerequisite second, destructive caveat third, side effects fourth, auth last. Each sentence carries distinct, actionable information.

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?

For a destructive, open-world write tool with an output schema already documenting the returned segment, the description covers prerequisite, replacement semantics, notification side effects, and required scope. Nothing critical for a correct invocation is missing.

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 the baseline is 3; the description still adds meaning by constraining target_segment_id to a 'compatible standalone matched segment' and framing filters as 'previously resolved identities'. It doesn't explain individual filter fields like boundary_at_from/to, but the schema already documents them.

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 opens with a specific verb and resource ('Create a matched segment, or add unique saved identities...') and distinguishes the two operating modes before anything else. It also contrasts itself with the sibling preview_saved_integration_segment, so an agent can place it correctly among the segment tools.

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 explicitly names the prerequisite step ('Call preview_saved_integration_segment first and confirm the exact counts and target with the user') and states the constraint that the target must be a 'compatible standalone matched segment'. The when-to-use condition for each mode is implied clearly by the two branches, and a real pre-call workflow is prescribed.

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