Skip to main content
Glama

Create Segmentation Run

create_segmentation_run

Create a run that classifies a population into a Segment's named groups and writes each record's winning label to a CRM field. A Segment is authored on the Rules page and holds named entries with predicates; this applies one to a scope. IT ALWAYS WRITES, unlike a scoring run, and the difference is worth knowing before composing one: a score has somewhere else to live -- LiveCRM's own store, where it is immediately filterable -- and a segment label does not. Nothing stores it, so a segmentation run that wrote nothing would compute a label and discard it. There is no compute-only form and no write_back to set. A SEGMENT NAMES ABSTRACT LABELS, not fields, which is what lets ONE Segment serve contacts, leads and accounts. Each application must therefore bind every label the Segment references to a real field on THIS object, and name the target field its winning label is written to. Call list_rule_templates with tool_type=segment to see the Segments and the labels each one uses. FIRST MATCH WINS per record, in the order the Segment's entries are authored. A record matching no entry is left ALONE rather than cleared, unless the Segment carries a default -- absent and unclassified are different facts, and clearing a field a rep may be reading is a destructive answer to the second.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesA name for the run, shown in the Runs tab. It writes each record's segment label to the field the application names.
dispositionNoWho releases this run's writes. 'execute' dispatches the pass on request, which is the default and what every run has always done. 'queue' stamps the run awaiting_approval and launches nothing until a person approves it. 'propose' dispatches the pass, which computes everything and writes NOTHING to the CRM, putting one reviewable proposal in the queue per record it would have changed — so a person approves the changes one at a time instead of the run wholesale. A credential may ask for either form of review and may never release it. Note that 'propose' still SPENDS what computing spends: an enrichment set to propose buys the provider data and then queues the writes, because a value nobody fetched cannot be proposed.execute
filter_specNoWhich records this run covers, as a filter tree. Omit for the whole object. It DESCRIBES a population and is resolved when the run is DISPATCHED, so write what you mean -- the CRO at Skypoint is `account_name is Skypoint AND title contains CRO` -- and never look a record up to write one. You need no ids and no counts. Call list_filterable_fields first, for the field names and operators only.
object_typeYesWhich CRM object the run targets: contact, account or lead.
segment_specNoRequired: the Segments to apply, at least one, each with the CRM field its winning label is written to and the binding from its labels to this object's fields. A segmentation run always writes the label; it is not stored anywhere else.
connection_idYesThe CRM connection. Required. Call list_crm_connections to get one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / segment_spec / description
      Added value: +"Required: the Segments to apply, at least one, each with the CRM field its winning label is written to and the binding from its labels to this object's fields. A segmentation run always writes the label; it is not stored anywhere else."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: first-match-wins ordering, unmatched records left ALONE unless a default exists, no compute-only form and no write_back field, and the always-writes contract. It also discloses the destructive edge case (clearing a field a rep may be reading) and the cost/SideEffects nuance. This is rich behavioral context over readOnlyHint=false/destructiveHint=false.

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

Conciseness3/5

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

The purpose is front-loaded, but the prose is long and repetitive, restating the always-writes point across multiple all-caps paragraphs and re-arguing the write_back rationale that the schema description already makes. Some sentences could be cut without losing signal.

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?

There is no output schema, and for a complex multi-object create the description covers scope, bindings, matching order, and default handling thoroughly. It is slightly short on what the create call returns (the run identity/handle) and its relationship to dispatch_run, but the behavioral picture is otherwise complete.

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?

Schema coverage is 100% so the baseline is 3, but the description adds conceptual meaning: it explains why each SegmentApplication must bind every referenced label to a real field on THIS object and name the target_field, and why write_back is deliberately absent. These are semantics beyond the raw schema text, though much overlaps with the already-detailed schema descriptions.

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+resource and scope: 'Create a run that classifies a population into a Segment's named groups and writes each record's winning label to a CRM field.' It also explicitly differentiates from its closest sibling by contrasting with the scoring run ('IT ALWAYS WRITES, unlike a scoring run'), so an agent can separate it from create_score_run without opening either 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?

Gives clear context and prerequisites: call list_rule_templates with tool_type=segment to see the Segments and labels, and filter_spec guidance directs to list_filterable_fields. It establishes when the tool applies (label has nowhere else to live) but stops short of an explicit use-this-vs-siblings routing rule for the other create_*_run tools.

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.