Skip to main content
Glama

segments_update

Updates segment name, description, priority, pinned status, filters, or exclude_filters. After saving, the server re-evaluates all include and exclude filters via add_leads_from_filters() — leads matching include filters are added, leads matching exclude filters are removed.

This is the way to trigger filter re-evaluation after editing a filter config. Editing a filter alone does NOT retroactively update segment membership — you must call this endpoint on each affected segment.

Note: re-evaluation only adds newly matching leads (and removes excluded ones). Leads that no longer match include filters are not removed. To rebuild from scratch, call segments_purge first, then segments_update.

Method: PATCH /api/v1/workspaces/{workspace_sqid}/segments/{sqid}/

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": {
      "sqid": "<sqid>"
    },
    "name": "segments_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoShort human label shown in the UI (e.g. 'Funded startups in NYC').
sqidYes
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.1/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: it discloses the server-side side effect of re-running add_leads_from_filters(), the additive asymmetry (newly matching leads are added, excluded ones removed, but leads that no longer match include filters persist), and the PATCH endpoint. The gap is that partial-update semantics are never stated - whether omitted fields are left untouched and whether supplying a filters array replaces or appends to the existing list is left ambiguous for a mutation tool.

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 first sentence front-loads the updatable fields and the behavioral warning follows immediately, which is the right ordering. A few lines are redundant - the 'This is the way to trigger filter re-evaluation' paragraph restates the preceding sentence, and the raw 'Method: PATCH /api/v1/...' line adds little for an agent that already has the tool name - but nothing is seriously bloated.

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 7-parameter mutation tool with no annotations and no output schema, the definition covers the highest-risk unknown (the filter re-evaluation side effect and its one-way nature) and points at the purge-based rebuild path. What is still missing is the partial-versus-full update contract and any indication of permission or failure behavior, which matter for a PATCH endpoint.

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 already 86%, so the schema documents every parameter meaningfully (priority range, exclude_filters outranking include, pinned being cosmetic). The description adds little parameter-level meaning beyond noting that include filters drive adds and exclude filters drive removals, which is close to what the schema already says. Baseline 3 is appropriate.

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 and enumerates exactly which fields can be changed ('name, description, priority, pinned status, filters, or exclude_filters'), so an agent can immediately tell this is a segment field mutator rather than a membership-only operation. It does not distinguish itself from close siblings like segments_pin (which also touches pinned status) or segments_create/delete, so it stops short of 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 Guidelines5/5

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

It gives explicit when-to-use guidance ('This is the way to trigger filter re-evaluation after editing a filter config'), an explicit when-not ('Editing a filter alone does NOT retroactively update segment membership'), and a named alternative workflow ('To rebuild from scratch, call segments_purge first, then segments_update'). The agent does not have to infer sequencing.

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.