Skip to main content
Glama

segments_create

Creates an empty segment. To populate it, either:

  • Call leads_bulk_add_to_segment with discovery GUIDs, or

  • Attach a FilterConfig (via UI or filter_configs_create + segment.filters M2M) so leads matching the filter are added automatically, or

  • Create a SavedSearch targeting this segment for continuous drip.

For bulk segment generation from a natural-language brief, use segments_suggest instead — it produces multiple matching segments + filters in one LLM call.

Method: POST /api/v1/workspaces/{workspace_sqid}/segments/

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>"
    },
    "name": "segments_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesShort human label shown in the UI (e.g. 'Funded startups in NYC').
pinnedNoShow at the top of the segment list in the UI. Cosmetic only.
filtersNoList of FilterConfig sqids. Leads matching any filter are auto-included.
priorityNoHigher-priority segments send first when multiple campaigns compete for mailbox send slots. Range roughly -100..100; default 0.
descriptionNoFree-form notes on the segment's intent — useful for AI agents deciding which segment to target.
exclude_filtersNoList of FilterConfig sqids. Leads matching any are auto-excluded (higher priority than include).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well on the key behavior: the segment is created empty and population requires a separate mechanism, which is the single most likely agent mistake here. It omits permission/auth requirements, whether the call is idempotent on duplicate names, and what the response contains (the segment sqid needed for every follow-on call) — a real gap for a creation tool with no output schema.

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-loaded with the core action, then a tight three-bullet enumeration, then the alternative tool. The trailing 'Method: POST /api/v1/...' line is arguably redundant for an agent that already has the tool name, but it is one short line and does no harm.

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 six-parameter creation tool with no annotations and no output schema, the description covers the creation semantics, all population paths, and the sibling alternative. The remaining gap is the return value — an agent needs to know it gets back an identifier to pass to leads_bulk_add_to_segment — but everything needed to decide to call it is present.

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 coverage is 100%, so the schema already documents all six parameters including filters, exclude_filters, and priority semantics. The description reinforces the filters mechanism but adds little meaning beyond the schema's own 'Leads matching any filter are auto-included' and says nothing about name, pinned, priority, or exclude_filters. Baseline 3 applies.

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 ('Creates an empty segment') and immediately flags the non-obvious nuance that the result is empty, which distinguishes it from population/enrichment siblings. It also explicitly names segments_suggest as the different path, so an agent can route correctly 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Enumerates three concrete follow-on strategies with the exact sibling tools to call (leads_bulk_add_to_segment, filter_configs_create + M2M, saved_searches_create) and gives an explicit exclusion: use segments_suggest for bulk generation from a natural-language brief. That is as close to explicit when/when-not guidance as this catalog offers.

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.