Skip to main content
Glama

Save a segment

save_segment
DestructiveIdempotent

Save a named set of filters as a segment, so the team can apply it in the dashboard's Segments menu. A segment with the same name (case-insensitive) is replaced. Needs member or owner access. Use the same filters shape as the other tools.

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

Input Schema

NameRequiredDescriptionDefault
nameYesShort name, e.g. "Returning visitors from Europe".
siteNoSite domain (example.com), id or public id (tb_…). Optional with a site key, or when the account has one site.
filtersYesAt least one filter, e.g. {"channel": ["Paid Search", "Paid Social"], "country": {"is_not": "US"}}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, the description discloses important behavior: a segment with the same case-insensitive name is replaced, and member or owner access is required. This adds meaningful context for a destructive, idempotent write operation, though it does not describe the response or failure behavior.

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?

The description is four short, front-loaded sentences with no wasted text. Purpose, overwrite behavior, access requirement, and filter-shape guidance each add distinct value.

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 mutation with full schema coverage and annotations covering safety hints, the description provides the key missing context: overwrite semantics, access level, and filter shape. It lacks any indication of the return or confirmation behavior, but no output schema exists to define that expectation.

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 100%, so name, site, and filters are already well documented. The description adds only a general note to use the same filters shape as other tools, which does not significantly extend parameter semantics beyond the schema.

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?

The description gives a specific verb and resource: save a named set of filters as a segment. It also clarifies the user-facing effect, that the team can apply it in the dashboard's Segments menu, which distinguishes it from siblings like list_segments and 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?

It clearly explains the context for using the tool: persisting a named filter set for team use in the dashboard, plus the member-or-owner access prerequisite. It does not explicitly name alternatives or when-not-to-use cases, but the intended usage is clear.

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