Skip to main content
Glama

Create segment

create_segment
Destructive

Save an audience (a segment, a cohort): it appears in the console under Audience → Segments, and broadcasts can be sent to it. Everyone who can be texted: one rule, status is subscribed. Contacts matching all (or any) of up to 10 rules. Attributes: tags, contact fields, custom fields (field = "field", key = the name), opt-in status, topic, import, created_at. Behaviour: last_message_at, last_reply_at, batch (key = batch id; value included, sent, failed, skipped or replied) and event (key = a tracked event name). Times take an ISO date or a window like 7d. It is evaluated live each time it is used, so a batch or list sent to it reaches whoever matches then.

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": "create_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoSegment name
matchNoall: a contact must match every rule. any: at least one ruleall
rulesNoUp to 10 rules that decide who matches
descriptionNoWhat the segment is for

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / description / description
      Added value: +"What the segment is for"
    • addedInput schema / properties / match / description
      Added value: +"all: a contact must match every rule. any: at least one rule"
    • addedInput schema / properties / name / description
      Added value: +"Segment name"
    • addedInput schema / properties / rules / description
      Added value: +"Up to 10 rules that decide who matches"
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The description adds important behavioral context beyond the annotations, especially that the segment is evaluated live each time it is used and that batches/lists sent to it will reach whoever matches at that time. It also explains rule limits and time formats. It stops short of discussing permissions, rate limits, or idempotency, which are not fully covered by the annotations.

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?

The description is front-loaded with the core purpose and remains information-dense without obvious filler. It is a single long paragraph rather than structured bullets, but every sentence contributes relevant context for a complex nested filter schema.

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 creation tool with a rich nested schema and helpful annotations, the description covers the essential semantics: what a segment is, how rules work, live evaluation, and time formats. It does not describe the response or return value, but no output schema exists, so that is a minor gap.

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 the schema already documents the parameters thoroughly. The description reinforces key concepts such as match=all/any, rule limits, custom field key usage, and ISO/window time formats, but adds little beyond what the schema already provides.

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 clearly states a specific verb and resource: saving an audience/segment/cohort, where it appears in the console, and that broadcasts can be sent to it. It does not explicitly distinguish itself from siblings such as preview_segment or update_segment, which keeps it from a 5.

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?

Usage is implied through the explanation of what a segment is and what it is used for, but there is no explicit when-to-use guidance versus alternatives like preview_segment (for testing) or update_segment (for modification). The description gives context but no exclusions or alternatives.

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.