playtable_runs

Estimate playtable run cost

Dry-run pricing for an enrich run - THE money-honesty gate (§4.6): call it BEFORE any paid create_playtable_run(type:"enrich") and surface the range to the user. Resolves the scope row count per field (ES run_condition prefilter - approximate by design, the worker re-checks per cell; done cells are skipped unless force_rerun:true = re-charge consent; cells:not_run | error prices only the cells that have not run or only the error ones) and prices each field's materialized waterfall from the cached gtm-api tool registry.

Returns rows_matched, cost_min (every row succeeds on the cheapest step), cost_max (full waterfall at max prices), cost_expected (registry expected path), priced_at, and a per-field breakdown with per-step price ranges - pass cost_max as max_budget at create (cost_expected is a midpoint, not a cap). No writes, no charges - free to call; free run types (export|import|bulk) have nothing to estimate. Also the answer to "what would it cost to …" - estimate only, no run. A view/filter scope is priced by count (rows_matched = the ES count; rows_to_run per field subtracts the rows already done unless force_rerun, or counts the error rows by id under cells), so any size prices instantly and rows_matched is never a truncated number.

Contract:

  • MCP tool estimate_playtable_run, registry package mcp.playtables/playtable_runs, mount playtables.columns.
  • Operation action, response envelope action.
  • Flags: read only.
post/api/playtable-runs/estimate

Request

  • Base URL
    https://beta.getsales.io/playtables/v1
  • Auth
    HTTP bearer and API key in header Team-SID

Request body

playtable_sidstring required

Parent playtable sid (pt_tb_…).

object_type'people' | 'company' required

Which tab the run would target: people | company.

type'enrich'

The type of the run this prices: enrich, the one paid type, the same word create_playtable_run takes (export, import and bulk have nothing to estimate). Optional; any other word is a 422 here, before the create.

field_sidsstring[] required

The fields that would run (pt_fd_…, 1..20; action columns only).

force_rerunboolean

Default false - count done cells as re-runnable (they would be re-charged).

cells'not_run' | 'error'

Price only the cells that have not run (not_run) or only the error cells (error); the same selection as params.cells on create.

Response

action success envelope.

successtrue required
operation'action' required
actionstring required

kebab-case verb; matches the route segment.

itemunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.