Skip to main content
Glama

Preview segment costs

preview_segment_costs
Read-onlyIdempotent

Preview a segment cost update WITHOUT changing anything: how many clicks would carry the cost, how many days they span and what the segment currently books. The segment = period + any analytics filters (campaign alias(es) comma-separated, offer, site/zone, source_id, creative, subs, geo, groups, tags, …). The dry run of a segment cost update.

Input Schema

NameRequiredDescriptionDefault
osNo
ispNo
cityNo
siteNoPlacement / zone id as passed by the ad network
sub1NoFilter by sub1
sub2NoFilter by sub2
sub3NoFilter by sub3
sub4NoFilter by sub4
sub5NoFilter by sub5
sub6NoFilter by sub6
sub7NoFilter by sub7
sub8NoFilter by sub8
sub9NoFilter by sub9
userNoWorkspace member id(s), comma-separated — the campaign owner at click time (needs the "See statistics per team member" permission; ignored otherwise)
offerNoOffer id
sub10NoFilter by sub10
sub11NoFilter by sub11
sub12NoFilter by sub12
sub13NoFilter by sub13
sub14NoFilter by sub14
sub15NoFilter by sub15
deviceNomobile / tablet / desktop
periodNoReporting period (default 7days). Use 'custom' with date_from/date_to.
sourceNoTraffic source id
browserNo
countryNoCountry ISO alpha-2 code, e.g. ES
date_toNoYYYY-MM-DD (with period=custom)
landingNoLanding id
campaignNoCampaign ALIAS(es), comma-separated for several
creativeNoCreative id from the click URL
languageNo
pwa_tagsNoComma-separated tag ids — pwas carrying any of them
referrerNo
utm_termNoExact utm_term value from the click URL
date_fromNoYYYY-MM-DD (with period=custom)
pwa_groupNoPwa group id
smartlinkNoSmartlink id
source_idNoSource id as passed by the ad network
offer_tagsNoComma-separated tag ids — offers carrying any of them
utm_mediumNoExact utm_medium value from the click URL
utm_sourceNoExact utm_source value from the click URL
ad_campaignNoThe ad network's own campaign id (external_campaign_id)
aff_networkNoAffiliate network id
offer_groupNoOffer group id
source_tagsNoComma-separated tag ids — sources carrying any of them
unique_onlyNoOnly unique clicks carry cost; repeat visits in the segment are zeroed by a set
utm_contentNoExact utm_content value from the click URL
include_botsNoLet bot clicks carry cost too (default false — networks never bill crawlers)
landing_tagsNoComma-separated tag ids — landings carrying any of them
source_groupNoSource group id
utm_campaignNoExact utm_campaign value from the click URL
campaign_tagsNoComma-separated tag ids — campaigns carrying any of them
landing_groupNoLanding group id
campaign_groupNoCampaign group id
smartlink_tagsNoComma-separated tag ids — smartlinks carrying any of them
connection_typeNo
smartlink_groupNoSmartlink group id

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered; the description adds value by stating the preview returns click counts, day span and current booked cost, and by explaining how the segment is composed. It does not mention permission requirements for sensitive filters (the schema notes the 'See statistics per team member' permission for `user`) or what an empty segment returns.

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 tight sentences with the no-write guarantee front-loaded, followed by a compact definition of the segment and the dry-run classification. No filler, and the most decision-relevant information comes first.

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 57-parameter read-only preview with no output schema, the description is substantially complete because it describes what the dry run reports (click counts, span, current bookings) and what constitutes the segment. Missing only edge-case behavior such as empty-segment results or permission-dependent filters, which are partly covered in the schema itself.

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?

With 57 parameters and 88% schema description coverage, the schema already documents nearly every filter, so baseline 3 applies. The description adds only a light summary of the filter families and the comma-separated convention for campaign aliases, without clarifying combination semantics (AND across filters) or how period interacts with date_from/date_to beyond what the schema says.

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 ('preview a segment cost update') and immediately defines the scope as a dry run that changes nothing. The phrase 'The dry run of a segment cost update' implicitly distinguishes it from the apply-side sibling set_segment_costs, so an agent can pick the preview tool without opening either 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?

The 'WITHOUT changing anything' / 'dry run' framing gives a clear condition for selecting this tool before a real cost update. It stops short of explicitly naming set_segment_costs as the follow-up action or stating when a preview can be skipped, so it is strong context but not a full when/when-not/alternative map.

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