Skip to main content
Glama

Close Out Campaign

close_out_campaign
DestructiveIdempotent

Record a finished campaign's actuals: spend (with currency), impressions, clicks and attributed orders — at least one. Close-out opens the day after the campaign's last day in the workspace's time zone (see campaign.closeOutOpensOn). Recording again replaces the previous actuals; identical actuals change nothing. It does not change the plan's state or forecast. Identify the plan by planId, or by externalSource plus externalId.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "close_out_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoClose-out notes, max 1000 characters.
planIdNoThe plan id (GUID).
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview (per-field old→new actuals) plus a single-use previewReceipt. Nothing is recorded until the commit call.
externalIdNoThe campaign's external id, with externalSource.
actualSpendNoActual total spend.
actualClicksNoActual clicks.
externalSourceNoThe campaign's external source, with externalId.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.
actualImpressionsNoActual impressions.
actualSpendCurrencyNoISO 4217 currency of actualSpend, e.g. USD.
actualAttributedOrdersNoOrders the ad platform attributed to the campaign.

Output Schema

NameRequiredDescriptionDefault
okNo
planNo
outcomeNo
previewNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.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=true, and the description corroborates them with substance: re-recording replaces prior actuals, identical actuals change nothing, and plan state/forecast are untouched. The one notable behavior it omits is that writes require a two-step preview-then-commit handshake, which appears only in the parameter schema.

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 core action and the field list, then the timing rule, then the replace/idempotency semantics, then identification. Dense but every sentence carries a distinct fact; the only mild cost is that the opening sentence packs several clauses into one line.

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 12-parameter, zero-required mutation tool with an output schema, the description covers timing, minimum data, replacement semantics, and identity resolution. The critical two-step preview/commit requirement lives only in schema field descriptions, so an agent skimming the description alone could miss the write protocol.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds constraints the schema does not: at least one actual metric must be supplied despite zero required parameters, and identity is either planId or the externalSource plus externalId pair. That meaningfully disambiguates how to fill the optional parameter set.

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 ('Record a finished campaign's actuals') and enumerates exactly which fields constitute the record: spend with currency, impressions, clicks, attributed orders. It also scopes itself negatively ('does not change the plan's state or forecast'), which separates it from plan-mutating siblings like upsert_campaign_plan.

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 a concrete when-to-use condition — close-out opens the day after the campaign's last day in the workspace time zone, with a pointer to campaign.closeOutOpensOn — plus the 'at least one actual' precondition. It stops short of naming an alternative tool for reading results versus recording them, so the routing is implied rather than explicit.

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