Skip to main content
Glama
thenavidm
by thenavidm

Delete segment

delete_segment
Destructive

Remove a Beehiiv audience segment to clean up publication targeting; set confirm=true to authorize this state-changing deletion.

Instructions

Delete segment. Changes account state and requires confirm=true for the user-requested action. OAuth integrations require segments:write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoNamed private account from BEEHIIV_ACCOUNTS. Defaults to BEEHIIV_DEFAULT_ACCOUNT or the first configured account.
confirmNoSet true only when the user asked for exactly this action.
segment_idYesThe prefixed ID of the segment object
publication_idYesThe prefixed ID of the publication object

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.0.1
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true for every account mutation. Confirms only the user-requested action."New value: +"Set true only when the user asked for exactly this action."
  2. First observedv2.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so safety is covered structurally. The description adds genuinely new context beyond that: the confirm=true gate and the required OAuth scope (segments:write), which an agent cannot infer from the schema or annotations.

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?

Three short sentences, front-loaded with the action and followed immediately by the two constraints that matter (confirm gate, OAuth scope). No filler or redundancy.

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?

With rich annotations, a 100%-documented schema, and no output schema, the description covers what an agent needs to invoke safely. It omits any note about downstream effects on segment membership or subscribers, a minor gap for a destructive operation.

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 account, confirm, segment_id, and publication_id are already documented in the schema, including the confirm semantics. The description restates the confirm requirement but adds no format, default, or edge-case 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("Delete segment"), which is unambiguous against siblings such as delete_subscription, delete_post, or delete_webhook. It does not explicitly contrast with those siblings, but the resource noun alone makes disambiguation trivial.

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 states a concrete precondition for use: confirm=true only "for the user-requested action," which tells the agent when invoking is appropriate. It does not name alternative tools (e.g., get_segment to inspect before deleting), so it falls short of the explicit when-not/alternative guidance a 5 requires.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools