Skip to main content
Glama

Update a segment

update_segment
Destructive

Renames a segment or replaces its rules. Newsletters and journeys that use it follow the change. Journeys that start on 'entered a segment' may start for people who now match.

Input Schema

NameRequiredDescriptionDefault
nameNo
rulesNoConditions on contact fields. mode "all" or "any"; each rule is { field, operator, value }. Fields: contact.name, contact.email, contact.consent (subscribed | unknown | unsubscribed), contact.email_status, contact.product_id, contact.created_at, contact.last_seen_at, contact.attributes.<field> (tags are contact.attributes.tags), contact.events.<event>. Operators: is, is_not, contains, not_contains, gt, gte, lt, lte, between (value and value2), any_of and none_of (value is a list of strings), exists, missing, before, after (dates are ISO or now-7d).
segmentIdYesSegment id from list_segments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / rules / description
      Previous value: -"Conditions on contact fields. mode \"all\" or \"any\"; each rule is { field, operator, value }. Fields: contact.name, contact.email, contact.consent (subscribed | unknown | unsubscribed), contact.email_status, contact.product_id, contact.created_at, contact.last_seen_at, contact.attributes.<field> (tags are contact.attributes.tags), contact.events.<event>. Operators: is, is_not, contains, not_contains, gt, lt, exists, missing, before, after (dates are ISO or now-7d)."New value: +"Conditions on contact fields. mode \"all\" or \"any\"; each rule is { field, operator, value }. Fields: contact.name, contact.email, contact.consent (subscribed | unknown | unsubscribed), contact.email_status, contact.product_id, contact.created_at, contact.last_seen_at, contact.attributes.<field> (tags are contact.attributes.tags), contact.events.<event>. Operators: is, is_not, contains, not_contains, gt, gte, lt, lte, between (value and value2), any_of and none_of (value is a list of strings), exists, missing, before, after (dates are ISO or now-7d)."
    • changedInput schema / properties / rules / properties / rules / items / properties / operator / enum
      Previous value: -[
      -  "is",
      -  "is_not",
      -  "contains",
      -  "not_contains",
      -  "gt",
      -  "lt",
      -  "exists",
      -  "missing",
      -  "before",
      -  "after"
      -]New value: +[
      +  "is",
      +  "is_not",
      +  "contains",
      +  "not_contains",
      +  "gt",
      +  "gte",
      +  "lt",
      +  "lte",
      +  "between",
      +  "any_of",
      +  "none_of",
      +  "exists",
      +  "missing",
      +  "before",
      +  "after"
      +]
    • addedInput schema / properties / rules / properties / rules / items / properties / value / anyOf
      Added value: +[
      +  {
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean"
      +    ]
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / rules / properties / rules / items / properties / value / type
      Removed value: -[
      -  "string",
      -  "number",
      -  "boolean"
      -]
    • addedInput schema / properties / rules / properties / rules / items / properties / value2
      Added value: +{
      +  "type": [
      +    "string",
      +    "number"
      +  ]
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already flag destructiveHint=true, but the description adds important non-obvious behavior: newsletters and journeys follow the change, and 'entered a segment' journey triggers may fire for newly matching contacts. It does not cover permissions, reversibility of replaced rules, or validation behavior, so it stops short of full transparency.

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 short sentences, front-loaded with the primary action and followed by the most consequential side effects. Every sentence earns its place and there is no repetition.

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 destructive nested-object mutation with no output schema, the description provides the key operational context: what changes and what downstream systems are affected. It leaves out whether at least one of name/rules is required and how existing segment membership is recalculated, but the core call behavior is covered.

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?

The description clarifies that name corresponds to renaming and rules corresponds to full replacement, which is meaningful beyond the schema's structural definition. The schema already documents the rules object richly; segmentId's origin is covered by its own schema description.

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 states a specific verb and resource: it renames a segment or replaces its rules. That is clear enough for an agent to know exactly what the tool does, but it does not explicitly differentiate itself from sibling tools such as create_segment or list_segments.

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 by 'update' and the existence of segmentId, but the description does not say when to choose this over creating a new segment or editing rules elsewhere. The downstream-effects sentence adds useful context but is not framing for tool selection.

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