Skip to main content
Glama

segments_delete

Deletes the segment. Leads belonging to it aren't deleted — they just lose this segment membership.

Returns 409 if any campaigns reference this segment (as primary or completed-segment target), with a campaigns list of {sqid, name, is_active, state} blockers.

Archived campaigns never block. They give up their segment reference on the way out, which is what makes a finished campaign's list deletable without touching a single message.

Method: DELETE /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_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqidYes

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 load and does well: it discloses the exact conflict semantics, the blocker payload shape `{sqid, name, is_active, state}`, and the side effect on leads. It omits idempotency/404 behavior, whether deletion is reversible, and any permission requirements, which are meaningful gaps for an unrecoverable mutation.

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?

Front-loaded with the action and the key non-effect, then the failure mode, then the exception. The closing editorial clause ("without touching a single message") is marketing flavor rather than operational information, a minor waste in an otherwise tight definition.

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?

No output schema exists, and the description compensates by documenting the one meaningful non-success response and its payload structure. It remains incomplete on the success response (status/body), reconfirmation of the sqid format, and permissions, for a destructive operation with zero annotation coverage.

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 0% and the single `sqid` parameter is undocumented in both schema and description. The method line hints at a second path parameter (workspace_sqid) that isn't in the schema, which may confuse an agent about how the workspace is supplied — but it does confirm the endpoint shape adds some meaning beyond the bare 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 opens with a specific verb and resource ("Deletes the segment") and immediately scopes what is NOT deleted (leads only lose membership), which distinguishes it from a cascade-style sibling such as segments_purge. An agent can identify the operation and its blast radius without opening the 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?

It clearly states the blocking condition (409 when campaigns reference the segment, either as primary or completed-segment target) and the exception (archived campaigns never block). It does not explicitly route to an alternative tool when deletion fails, so it stops short of full when/when-not guidance.

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.