Skip to main content
Glama

segments_purge

Empties the segment's lead membership list. The leads themselves stay in the workspace and in any other segments they belong to. Returns {purged: <count>}. Irreversible — re-populating needs another leads_bulk_add_to_segment or filter run.

Method: POST /api/v1/workspaces/{workspace_sqid}/segments/{sqid}/purge/

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

Input Schema

NameRequiredDescriptionDefault
nameYes
sqidYes
pinnedNoPinned segments are shown in the main menu for quick access
priorityNoWhen lead is included in multiple lists with active campaigns, the one with the highest priority will be processed first.
descriptionNoProvide a concise profile covering key aspects: demographics (age, gender, income, education, occupation), geographic details (location, climate), psychographics (lifestyle, values, interests, motivations), behavioral traits (buying habits, usage patterns, brand loyalty), and specific needs or challenges.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so well: it specifies what is destroyed (membership list), what survives (the leads and their other segment memberships), that the action is irreversible, and the exact return shape `{purged: <count>}`.

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 front-loaded with the core effect, immediately follows with preservation and irreversibility details, and ends with a compact method line. Every sentence adds useful information without repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The behavioral side is quite complete for a destructive operation, covering side effects, reversibility, and return value. However, for a tool with five parameters and a required `name` that appears unrelated to purging, the description should clarify the parameter expectations or schema mismatch.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has five parameters including a required `name`, but the description only references `sqid` through the endpoint path. It does not explain the role of `name`, `pinned`, `priority`, or `description` in a purge operation, leaving a notable gap at 60% schema coverage.

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 uses a specific verb and resource: 'Empties the segment's lead membership list.' It also clarifies that the leads themselves remain in the workspace and other segments, distinguishing this from deleting the segment or its leads.

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?

The description clearly conveys when the effect is appropriate by explaining that leads are preserved and only membership is removed. It also states the operation is irreversible and names the re-population path, but it does not explicitly compare this tool with a delete-segment alternative or list prerequisites.

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.