Skip to main content
Glama

Create a segment

flow_create_segment

Creates a segment: contacts matched by a filter, kept up to date by Bind. Its member count is worked out after it is saved; read it with flow_get_segment. The answer gives its id and link. filters is one group, e.g. {"operator":"AND","conditions":[{"field":"city","operator":"equals","value":"Zagreb"}]}; a condition is {field, operator, value} or a nested group (5 levels at most). Fields: name, lastName, email, city, address, note (operators equals, notEquals, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty); status (VERIFIED, UNVERIFIED, INVALID_NUMBER) and gender (Male, Female, Non-binary, Unknown) with equals, notEquals, in, notIn; prefixCountryId, countryId, networkId with the same four, as ids (a country object from flow_get_segment is taken by its id); birthDate (YYYY-MM-DD) with equals, notEquals, before, after, between [from, to]. in and notIn take an array.

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": {
      "name": "<name>",
      "filters": "<filters>"
    },
    "name": "flow_create_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
brandIdNoThe id of the brand this change is for: the active brand (flow_whoami). Required when the connection covers several brands; the change is refused when another brand is active.
filtersYesThe filter group; see the description

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=false, so the mutation profile is known. The description adds genuinely non-obvious behavior: member count is computed only after saving (so it is not available at creation time), the response returns an id and link, and filter nesting is capped at 5 levels. It does not say what happens on validation failure or whether duplicate names are allowed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the post-save count caveat are front-loaded, then the filter grammar follows in a single dense block. Every clause carries information, but the operator/field enumeration is delivered as an unbroken run-on, which makes it harder to scan than a short bulleted breakdown would be.

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 no output schema, the description correctly discloses the return value (id and link) and the delayed member count. Given three parameters, one of which is a free-form nested filter object, the filter grammar is thorough. Minor gaps remain: no mention of error/validation behavior or the brandId requirement in the description itself, though the schema documents brandId.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, with the filters object effectively untyped (additionalProperties), so the description must carry the load and does: it gives a full example group, the condition shape {field, operator, value}, nesting limits, per-field operator lists, enum values for status and gender, the 'in'/'notIn' array rule, date formats, and the rule that a country object is taken by its id. That is far more than the schema conveys for the highest-risk parameter.

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?

The description gives a specific verb and resource and explains the core mechanic: 'Creates a segment: contacts matched by a filter, kept up to date by Bind.' It also points to flow_get_segment for reading the computed member count, which separates create from read. It stops short of distinguishing a segment from flow_create_group, so an agent choosing between the two creation tools gets no help.

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?

Usable guidance is implied rather than stated: use flow_get_segment to read the member count after creation, and the filter must be a single group (not an array of groups). There is no explicit when-to-use versus flow_create_group, no statement of prerequisites or failure modes, and no 'when not to use' guidance. The schema's brandId description carries the multi-brand caveat, so that prerequisite is covered outside the description.

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