Skip to main content
Glama

Staged test media plan (draft)

get_test_plan
Read-only

A draft media plan for the workspace's staged ad test, built from the revenue ledger of the last 28 days (window since..until, the same rows as get_revenue_ledger with days 28). Read-only: it creates no campaign, changes no budget and writes nothing to an ad platform. channels[] always lists apple_search_ads, meta and google_ads (then any other channel with spend), each with spend (per currency), spendJpy (null when no exchange rate), spendDays (days with a spend row), payers (paying customers tied to the channel's campaigns that had spend in the window and who first paid inside the window, the sample size; null when the channel's payers cannot be tied to its ads, never zero), takeHome (those payers' first payments plus their own in-window renewals and refunds), notCounted (in the ledger rows but left out of the gates: zeroSpendCampaigns, payers and take-home from campaigns with no spend in the window; earlierPayers, renewals and the like from customers who first paid before the window), payback (takeHome ÷ spend), paybackIsLowerBound with excludedRevenue (money in a currency with no exchange rate, left out), costPerPayerJpy, maturing, selfReportedCeiling (upper bound from signup answers for channels without attribution), evidence (sufficient, insufficient or not_measurable), holdReasons and recommendation: budget (gets a share of step 1), hold or measure_only (payers not attributable, so the channel can only be measured). Rules: a channel gets step-1 budget only with no holdReasons: it must be attributable (not_attributable), have spend (no_spend) above zero (non_positive_spend) convertible to yen (spend_not_converted), at least rules.minPayers (6) payers (too_few_payers), take-home payback at least rules.paybackLine (1.1; below_payback_line, or revenue_not_converted when a lower bound from excluded money is below it), and cost per payer not above the test's stop line (above_stop_line); no_staged_test when the workspace has no staged test; share_rounds_to_zero when its share of the daily amount rounds down to 0.stagedTest (null without a staged test) gives the test's own settings (startDate, minDays, maxDays, dailyBudgetJpy, scaleAtOrBelowJpy and stopAboveJpy per paying customer, trialScaleAtOrBelowJpy and trialStopAboveJpy per trial, scaleToDailyJpy, capMonth, capMonthTotalJpy) and step1: dailyBudgetJpy split across budget channels in proportion to their window spend, rounded down to rules.roundToJpy, with allocatedDailyJpy, unallocatedDailyJpy and maxStep1SpendJpy (allocated × maxDays). baseline gives total new paying customers (ads, creator codes and unattributed) per week for the last 4 weeks, so the test can be read as lift over it; a week before revenueEventsFrom is null and not counted. unattributedPayers are paying customers tied to no campaign or code; they are never added to a channel. notes: no_revenue_events, revenue_window_partial, unattributed_payers, unknown_campaign_payers, zero_spend_campaign_payers, earlier_payers_not_counted, no_channel_ready, step1_exceeds_cap. Money in (revenue) and payback are take-home: after store fees and refunds, so payback compares what the advertiser keeps with spend. Events sent before store fees (amountIsNet false) are reduced by the workspace's fee rate for their store, refunds by the same rate, before any currency conversion; amounts are shown rounded to the currency's smallest unit, payback is computed before rounding. Rows, totals, keyword rows and weeks carry takeHomeBasis (null when no event has an amount): takeHomeBasis.kind says where the take-home figure comes from: net_reported (sent after store fees), net_estimated (sent before fees, reduced by the workspace's store fee rate), net_mixed (both), gross or gross_mixed (not converted to take-home); takeHomeBasis.storeFees lists the rate used per store, isDefault true when it is Loop's default estimate (App Store 15%, Google Play 15%, Stripe 3.6%, other 0%) because the workspace set none (appProfile.storeFeeRates in PATCH /api/{workspace}/config). Taxes are not deducted, and the workspace's current rates are applied to past purchases too.

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": "get_test_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/destructiveHint=false and openWorldHint=false, and the description reinforces rather than contradicts them ("creates no campaign, changes no budget and writes nothing to an ad platform"). Beyond that it discloses genuinely non-obvious behavior: null semantics for spendJpy/payback, paybackIsLowerBound with excludedRevenue, the exact gating rules and hold reason codes, rounding behavior ("payback is computed before rounding"), the takeHomeBasis provenance kinds, and the default store fee rates applied when the workspace set none. This is unusually rich disclosure for a mutation-free tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Length is defensible because there is no output schema and the return shape is genuinely elaborate, and the purpose is front-loaded in sentence one. However, the body is a single run-on paragraph of semicolon- and parenthesis-chained clauses with no segmentation, making the per-channel field list, the holdReasons rules, stagedTest/step1 and baseline hard to parse. Structure, not size, is the weakness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, no parameters and substantial computational complexity, the description carries the full contract and does so thoroughly: it enumerates channels[] fields, payback/CPP math, the step-1 allocation logic, stagedTest settings, baseline weeks (including when a week is null), unattributedPayers and the notes codes. An agent can describe the result to a user without calling it blind.

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

Parameters4/5

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

The tool takes zero parameters (empty object schema, additionalProperties false), so there is no parameter semantics to explain and the baseline of 4 applies. The 28-day window is effectively hardcoded and the description makes that explicit, which is the only parameter-like fact an agent needs.

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 opening sentence names a specific artifact and its source: "A draft media plan for the workspace's staged ad test, built from the revenue ledger of the last 28 days." It even disambiguates from the nearest sibling by stating the rows are "the same rows as get_revenue_ledger with days 28." An agent knows exactly what this produces versus the ledger tool.

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?

Usage is implied rather than stated: the agent can infer it should call this when it wants a step-1 budget allocation across channels a test could fund. There is one useful cross-reference (get_revenue_ledger), but no explicit "use this instead of X when..." and no mention of siblings like get_payback_actions, get_spend_audit or get_revenue_diagnosis that plausibly overlap. No prerequisites or preconditions (e.g., a staged test must exist) are framed as guidance, though the no_staged_test hold reason hints at it.

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