Skip to main content
Glama

Save a segment

crm_save_segment
Idempotent

Save filters under a name, such as "customers renewing within 30 days" (a new name creates a segment, an existing one replaces its filters). Use it with the segment argument of crm_find_contacts, crm_find_companies, crm_find_deals and crm_export. Relative dates (today+30) are worked out each time. Costs $0.001 per call; nothing if it fails.

Input Schema

NameRequiredDescriptionDefault
nameYes
sortNoDefault sort, e.g. "-amount".
objectYes
filtersYesConditions that must all match, e.g. [{"field": "lifecycle_stage", "op": "eq", "value": "customer"}, {"field": "renewal_date", "op": "lte", "value": "today+30"}]. field: a standard field, "tag", or a custom field key (crm_list_fields lists them all). op: eq, ne, contains, starts_with, in (value is a list), gt, gte, lt, lte, is_empty, is_set. Dates take YYYY-MM-DD or today, today+N, today-N.

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?

Annotations already cover the safety profile (non-destructive, idempotent, closed-world), and the description adds genuinely new behavior: overwrite-on-name-collision, per-call cost of $0.001 with no charge on failure, and that relative dates like today+30 are re-evaluated on every use. It stops short of saying whether a replace also overwrites `sort`/`object` or what is returned.

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?

One dense paragraph, front-loaded with the core action and semantics before the downstream-usage and cost clauses. Every sentence carries information, though the cost/failure clause and the parenthetical could be tightened slightly.

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 4-parameter, non-destructive upsert tool with no output schema, the description covers purpose, upsert behavior, consumers, date semantics and cost. Remaining gaps are minor: the returned identifier and the fate of `sort`/`object` on overwrite are unspecified.

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 50%: `filters` is documented richly in the schema, while `name`, `object` and `sort` are bare. The description compensates partly by giving a segment-name example and by explaining that relative date expressions in filter values are resolved at use time, but it says nothing about `object` scoping or `sort`, so the gap is only partially filled.

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 ("Save filters under a name") and immediately clarifies the upsert semantics: a new name creates a segment, an existing one replaces its filters. The concrete example ("customers renewing within 30 days") makes the resource unambiguous and distinguishes it from crm_list_segments/crm_delete_segment.

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?

Explicitly tells the agent where the saved segment is consumed: the `segment` argument of crm_find_contacts, crm_find_companies, crm_find_deals and crm_export. That is strong downstream context, but it does not say when *not* to save a segment or point to crm_list_segments/crm_delete_segment for the alternative workflows.

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