Skip to main content
Glama

Autopilot payback actions

get_payback_actions
Read-only

What Loop's Autopilot would do from the revenue ledger's take-home payback, per campaign (scope campaign) and per Apple Ads keyword (scope keyword, keywordRef): verdict pause (campaigns only), lower_bid (Apple Ads keywords only) or hold, with code, a short reason and the numbers used (spend, currency, netRevenue in the spend currency, payers, trials, payback, costPerPayer, taps). It never proposes more spend, a resume or anything new. Spend is settings.windowDays (28) days ending settings.settleDays (3) days ago (since, until); payments of trials started in that window are counted through today, so a trial that converts after the window still counts. Codes: zero_payers (no payer after spend reached settings.killSpendMultiple × settings.targetCostPerPayer), below_line (enough payers and payback below settings.paybackLine), and on hold: pays_back, not_enough_payers (fewer than settings.minPayers and spend below settings.enoughSpendMultiple × the target), maturing (half or more of the trials still open), not_measured, no_spend, unconverted_currency, no_exchange_rate (the target cost per payer cannot be put into the spend's currency), lower_bound (keyword payback is only a lower bound, checked before any cut), attribution_incomplete (under settings.minAttributedShare of the channel's payers, counting payers linked to no campaign unless they cannot be the channel's: Google Play buyers for Apple Ads, signup answers that name another kind of channel, such as social for Apple Ads, and payers whose events list the channel in notFromChannels; checked before any pause), no_taps, bid_at_floor, feed_stale (the ledger counts the workspace's own revenue sender and nothing has arrived for over 36 hours, so every pause and lower_bid is held). On lower_bid, bid gives avgCpt (keyword spend ÷ taps), proposed = avgCpt × payback ÷ paybackLine rounded to the currency, never below floor (the larger of settings.minBid and avgCpt × (1 − settings.maxBidCut)). targetCostPerPayer is appProfile.paybackActions.targetCostPerPayer, else the guardrail's max cost per purchase in the workspace currency, else null (then only payback decides). Settings are set with appProfile.paybackActions in PATCH /api/{workspace}/config. The periodic cycle writes each pause and lower_bid as a change waiting for a person's approval (a lowered bid only when it is below the keyword's current max bid), not again for the same target while one waits or within 7 days of a person's decision on it; a waiting proposal is withdrawn when a later run no longer calls for it or calls for a different amount (then proposed again under a new id). A keyword cut waits while its campaign's pause proposal waits or was approved. Approval runs as a preview unless the workspace is armed for live changes. 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_payback_actions"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior5/5

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

Despite annotations already marking it read-only and non-destructive, the description adds extensive behavioral context: the time window, how trials and conversions are counted, the full list of verdict codes and their conditions, the approval workflow, and the take-home revenue basis. It leaves virtually no ambiguity about what the tool computes or returns.

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

Conciseness2/5

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

The description is an enormous single block of text (~800 words) that buries key points like the verdict codes and approval logic deep in the paragraph. It is not front-loaded and would benefit from headings or bullet points. While dense with relevant detail, the lack of structure makes it hard to scan.

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?

Given the tool's complexity—autopilot logic, many verdict codes, approval flow, currency and take-home adjustments—and the absence of an output schema, the description is remarkably complete. It explains every code, the calculation window, fallback logic, and edge cases, leaving little room for misinterpretation.

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 has zero input parameters and schema coverage is 100%, so the baseline is 4. The description mentions 'scope campaign' and 'scope keyword, keywordRef' as output dimensions, which adds meaning about the shape of results rather than input parameters. No parameter semantics are needed, and none are misrepresented.

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 clearly states it returns what Loop's Autopilot would do, with verdicts per campaign and per Apple Ads keyword, and explicitly says it never proposes more spend or new actions. It distinguishes its output from other tools by describing the exact nature of the actions. However, it does not name or contrast with any sibling tool, leaving differentiation implicit.

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: the tool shows what Autopilot would do, so an agent can infer it is for previewing autopilot decisions. But there is no explicit 'use this when' guidance, no mention of alternatives (e.g., get_revenue_diagnosis or get_store_keyword_proposals), and no conditions under which to prefer or avoid 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