Skip to main content
Glama

Create Audience Segment

create_segment

[Act · writes] Create a new audience segment (named group of people) for the authenticated user. Set type='manual' for a hand-curated list (use add_to_segment to populate it), type='smart' with a config predicate (e.g. {title_contains:['VP','Chief']}) to define a dynamic segment resolved on-demand by resolve_segment, or pass template to pre-fill config from a built-in template (type defaults to 'smart'). Smart segments only match people connected to you: people who engaged with posts you can see in Flux (your own profile, tracked/monitored profiles, and posts you collected) and people in your campaigns' constellations. Smart segment membership is computed, so add_to_segment / remove_from_segment do not apply to it. Free — costs 0 credits.

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
nameNoUser-facing segment name. Optional when `template` is supplied — the template's default name is used.
typeNoSegment type. 'manual' = hand-curated person list. 'smart' = dynamic predicate (requires `config`). 'auto_stream' = system-managed from a stream. Defaults to 'smart' when `template` is provided.
configNoPredicate object for smart segments. Supported keys: title_contains, company_contains. Each takes a non-empty string or an array of 1-20 non-empty strings (case-insensitive substring match; an array matches if ANY term matches, e.g. {title_contains:['procurement','logistics','supply chain']}). Different keys are AND-combined. Any other key is rejected. Required when type='smart' and no template is supplied.
templateNoOptional pre-built template id. Available: 'vp_plus' (VP+ decision-makers), 'c_suite' (C-suite executives), 'heads_of' ('Head of' leaders), 'founders' (Founders & co-founders), 'fintech_leaders' (Fintech leaders), 'agency_owners' (Agency owners). Pre-fills `config` and defaults `type` to 'smart'. Explicit `config` overrides template values on collision.
descriptionNoOptional longer description
source_stream_idNoOptional stream that produced this segment (for traceability)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / config / description
      Previous value: -"Predicate object for smart segments. Supported keys: title_contains, company_contains. Each takes a non-empty string (case-insensitive substring match); different keys are AND-combined. Any other key is rejected. Required when type='smart' and no template is supplied."New value: +"Predicate object for smart segments. Supported keys: title_contains, company_contains. Each takes a non-empty string or an array of 1-20 non-empty strings (case-insensitive substring match; an array matches if ANY term matches, e.g. {title_contains:['procurement','logistics','supply chain']}). Different keys are AND-combined. Any other key is rejected. Required when type='smart' and no template is supplied."
  2. Changed1 schema field changed
    • changedInput schema / properties / config / description
      Previous value: -"Predicate object for smart segments. Supported keys: title_contains, company_contains, company_industry, engaged_with_topics. Required when type='smart' and no template is supplied."New value: +"Predicate object for smart segments. Supported keys: title_contains, company_contains. Each takes a non-empty string (case-insensitive substring match); different keys are AND-combined. Any other key is rejected. Required when type='smart' and no template is supplied."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare the write profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false), so the description's job is to add context, and it does: cost ('Free — costs 0 credits'), computed membership for smart segments, and the universe smart segments can match (your visible engagers and campaign constellations). What it doesn't cover is what is returned on creation (no output schema exists) or duplicate-name behavior, which are the remaining behavioral gaps.

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?

Front-loads the verb, resource, and actor in the first clause, then branches through the three modes. It is dense but each clause carries decision-relevant information; the template list and config key details are partly redundant with the schema and lengthen the middle sentence.

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 6-parameter, zero-required write tool with a nested config object and no output schema, the description covers mode selection, template pre-fill behavior, scope limitations, and cost. The notable omission is any indication of what the call returns (e.g., a segment id) since no output schema exists to carry that.

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?

With 100% schema coverage the baseline is 3, but the description adds interpretation beyond the schema: the type defaulting rule tied to template presence, an example config predicate ({title_contains:['VP','Chief']}), and the semantic meaning of 'smart' matching rather than just its mechanics. It largely restates template/config details already in the schema, which keeps it from a 5.

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 and resource ('Create a new audience segment') and immediately defines the resource ('named group of people') plus ownership scope ('for the authenticated user'). It also distinguishes the tool's three modes (manual, smart, template), which is the key differentiation from siblings like add_to_segment and resolve_segment.

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?

Explicitly routes each use case: type='manual' for hand-curated lists (with a pointer to add_to_segment to populate), type='smart' with a config predicate (resolved by resolve_segment), or a template to pre-fill config. It also states an exclusion — add_to_segment / remove_from_segment do not apply to smart segments — which is exactly the kind of when-not guidance that prevents misuse.

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