Skip to main content
Glama

Delete Segment (preview, then confirm)

delete_segment
DestructiveIdempotent

Delete a segment. The contacts in it are not deleted, but the segment can't be restored and campaigns can no longer target it. A segment used by a campaign that is scheduled or sending is refused. Needs segment_id. Shows a preview first and deletes only with confirm: true.

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": {
      "segment_id": "<segment_id>"
    },
    "name": "delete_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoMust be true to make the change. Leave it out first to get a preview, show it to the user, and ask them to confirm
dry_runNoShow what would be deleted without deleting
segment_idYesSegment ID (from list_segments)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, yet the description adds genuinely new behavior: irreversibility ("can't be restored"), downstream effect (campaigns can no longer target it), preserved contacts, and the in-use refusal rule. That is exactly the context an agent needs before calling a destructive 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?

Four short sentences, front-loaded with the action and its consequence, with no filler. It loses a point for partially duplicating the confirm parameter's schema text while never mentioning dry_run, leaving a slight imbalance rather than waste.

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 no output schema, the description covers irreversibility, side effects, and refusal conditions well. The remaining gap is the relationship between the dry_run flag and the omit-confirm preview path, which an agent must infer.

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 confirm, dry_run, and segment_id are already documented in detail. The description only restates segment_id as required and echoes the confirm gate; it adds no format or interaction detail beyond the schema, so baseline 3 applies.

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 and resource ("Delete a segment") and immediately disambiguates scope by saying the contacts inside are not deleted. An agent can distinguish this from delete_list, delete_contact, and delete_tag without opening any schema.

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?

Gives an explicit two-step workflow (preview first, delete only with confirm: true) and a concrete when-not condition: a segment used by a scheduled or sending campaign is refused. It doesn't name a sibling alternative, but for a terminal delete there is no real substitute, so the guidance is close to complete.

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