Skip to main content
Glama
thenavidm
by thenavidm

Recalculate segment

segments_recalculate
Destructive

Recalculate a Beehiiv segment to refresh its audience/membership state. Requires confirm=true and segments:write OAuth scope.

Instructions

Recalculate 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

B3.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety profile is covered. The description adds genuinely new context beyond the annotations: the fact that it "changes account state" and the OAuth scope requirement "segments:write." It stops short of saying what state is destroyed or whether the recalculation is synchronous.

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?

Three short sentences with the action and the confirm requirement front-loaded; nothing is bloated. Minor deduction because the confirm sentence partially duplicates the schema's own confirm description.

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, non-idempotent mutation with full annotation coverage and a fully described 4-parameter schema, the description supplies the key extras an agent needs: confirm gating, state mutation, and auth scope. No output schema exists, so return-value detail is not expected.

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 every parameter including confirm and account is already documented in the schema. The description repeats the confirm semantics ("requires confirm=true") without adding format or edge-case detail, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

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

The first sentence, "Recalculate segment," is essentially a restatement of the tool name and title, so it does not explain what recalculation actually does (recompute membership? refresh counts? async job?). It is a verb+resource but leaves the operation's effect undefined and does not distinguish it from siblings like get_segment or segments_expand_results.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It implies when the tool should be invoked by tying confirm=true to "the user-requested action," which is real usage guidance. However, it names no alternative tool and gives no explicit when-not conditions or prerequisites beyond that single flag.

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