Skip to main content
Glama

volanea_create_segment

DestructiveIdempotent

Create a dynamic audience segment from a condition tree (membership recomputes automatically). With dryRun: true it returns the live member count and a sample of matching contacts without creating anything, so the filter can be checked before the segment is saved. Idempotent by name.

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": {
      "conditions": "<conditions>"
    },
    "name": "volanea_create_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoSegment name. Acts as the idempotency key. Not required when dryRun is true.
dryRunNoWhen true, only preview the match count and sample — nothing is created or modified. Two things skew a preview: any `event.<name>` or `data.<field>` this project has never recorded is reported in `warnings` (a typo matches zero contacts and looks identical to an empty audience), and contacts created by this MCP server's own tools (volanea_track_event, volanea_test_workflow) are tagged as test artifacts and are EXCLUDED from segment evaluation entirely — seeding one will not move this count.
conditionsYesCondition tree over contacts. `logic` combines the groups ("and"/"or"); filters *within* a group are always ANDed. Filter fields: `email`, `firstName`, `lastName`, `locale`, `subscribed`, `createdAt`, `data.<customField>` (discover custom fields with volanea_list_resources { resource: "contact_fields" }), `event.<eventName>` (product events — discover names with volanea_list_resources { resource: "event_names" }), and `email.opened` / `email.clicked` / `email.bounced`. Operators for plain/data fields: equals, notEquals, contains, notContains, greaterThan, lessThan, exists, notExists, within (requires `days`), olderThan (requires `days`). Operators for event.*/email.* activity fields: triggered, notTriggered (optional `days` restricts to a recent window).
project_idNoWhich project to act on — a projectId from volanea_list_projects. Optional when this connection reaches exactly one project; required when it reaches several (the call fails with the list of projects instead of guessing). A project API key only ever reaches its own project.
descriptionNoOptional note for whoever reads the segment list later — why this audience exists, not what the filter does. The conditions already say what it does.

Output Schema

NameRequiredDescriptionDefault
codeNoMachine-readable failure code to branch on. Present only when success is false.
dataNoPresent when success is true.
errorNoHuman-readable failure reason. Present only when success is false.
successYesFalse when the call failed; read `error` and `code` in that case.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / project_id
      Added value: +{
      +  "description": "Which project to act on — a projectId from volanea_list_projects. Optional when this connection reaches exactly one project; required when it reaches several (the call fails with the list of projects instead of guessing). A project API key only ever reaches its own project.",
      +  "type": "string"
      +}
  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 idempotency, non-read-only, and destructiveness, and the description reinforces the first by naming the idempotency key ('Idempotent by name') and adds genuinely new behavior: membership recomputes automatically, and dryRun returns a live count plus sample with nothing created. It does not explain the destructiveHint=true — e.g., whether a segment can be replaced or removed afterward — which is the one behavioral fact an agent would still want.

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 sentences, each doing distinct work: core behavior first, preview mode second, idempotency last. The most decision-relevant fact (what gets created, and the safe preview escape hatch) is front-loaded, and there is no restatement of the tool name or 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?

For a high-complexity tool with a deeply nested condition tree, an output schema covering return values, and 100% schema coverage, the description supplies the missing behavioral layer: recompute semantics, dry-run safety, and idempotency. The remaining gap is the destructive/idempotency interaction — whether re-creating with the same name overwrites an existing segment — which matters for an agent deciding whether a retry is safe beyond mere duplication.

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 all five parameters, including the nested condition tree and the warnings/test-artifact caveats, are already documented in structured fields. The description only adds framing around `dryRun` and the name-as-idempotency-key relationship, which the schema itself already states. Baseline 3 is appropriate when the schema carries the load.

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 names a specific verb and resource ('Create a dynamic audience segment') and immediately qualifies the mechanism ('from a condition tree (membership recomputes automatically)'), which tells an agent this is a live-recomputed segment rather than a static snapshot. No sibling tool in the catalog creates segments, so it is distinguishable by name and by function without opening the 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?

It gives an explicit conditional recipe for the alternative mode: 'With `dryRun: true` ... so the filter can be checked before the segment is saved.' That is clear when-to-use guidance for the preview path. It stops short of stating when NOT to create a segment at all (e.g., prefer an update path if one exists) or any prerequisite ordering beyond what the schema covers.

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.