Optimize cloud reserved capacity

Choose an integer portfolio of dated cloud reservations across coherent demand, realization, spot, and on-demand scenarios; price unused commitment and unserved demand explicitly, enforce coverage and capital gates, optimize expected-plus-CVaR cost, and disclose exact versus deterministic supported-set search.

What it's for

Moves cloud commitment from a utilization dashboard to an auditable integer purchase plan that prices demand coverage, fallback scarcity, unused capacity, and catastrophic under-provisioning together.

What you give it

Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.

Field Type Role Required
demand_scenarios array of objects (8 fields) ≥ 2 items Evidence Yes
max_detail_rows integer ≥ 1, ≤ 500 Numerical control Optional
maximum_cvar_total_cost number ≥ 0 Your calibration Optional
maximum_exact_states integer ≥ 2, ≤ 1000000 Numerical control Optional
maximum_upfront_commitment number ≥ 0 Your calibration Optional
minimum_demand_coverage_probability number ≥ 0, ≤ 1 Your calibration Optional
reservation_offers array of objects (7 fields) ≥ 1 item Evidence Yes
risk_aversion number ≥ 0 Your calibration Optional
tail_probability number > 0, ≤ 0.5 Your calibration Optional
value_per_unserved_unit number ≥ 0 Your calibration Yes

Each demand_scenarios record

Field Type Required
demand_units_by_period array of number (≥ 1 item) Yes
id string (non-empty) Yes
on_demand_capacity_limit_by_period array of number (≥ 1 item) Yes
on_demand_unit_cost_by_period array of number (≥ 1 item) Yes
probability number (≥ 0, ≤ 1) Yes
reserved_capacity_realization_fraction_by_period array of number (≥ 1 item) Yes
spot_capacity_limit_by_period array of number (≥ 1 item) Yes
spot_unit_cost_by_period array of number (≥ 1 item) Yes
Example input
{
  "demand_scenarios": [
    {
      "demand_units_by_period": [
        10,
        10
      ],
      "id": "high",
      "on_demand_capacity_limit_by_period": [
        20,
        20
      ],
      "on_demand_unit_cost_by_period": [
        1,
        1
      ],
      "probability": 0.5,
      "reserved_capacity_realization_fraction_by_period": [
        1,
        1
      ],
      "spot_capacity_limit_by_period": [
        0,
        0
      ],
      "spot_unit_cost_by_period": [
        2,
        2
      ]
    },
    {
      "demand_units_by_period": [
        5,
        5
      ],
      "id": "low",
      "on_demand_capacity_limit_by_period": [
        20,
        20
      ],
      "on_demand_unit_cost_by_period": [
        1,
        1
      ],

Truncated for display — the full payload is 72 lines.

What you get back

This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.

Example output
{
  "decision": "purchase_governed_reserved_capacity_plan",
  "failed_gates": [],
  "guardrails": [
    "Demand, reservation realization, spot interruption, on-demand limits, prices, credits, taxes, regions, currencies, and contract eligibility must be represented on one coherent service boundary.",
    "The optimizer never invents fallback capacity: unserved units remain visible and are priced with the submitted business value, while the coverage gate can still veto a cheap plan.",
    "Heuristic mode returns a deterministic supported plan without a global optimality certificate; material purchases require quote validation, sensitivity analysis, and FinOps, architecture, finance, security, legal, and procurement approval.",
    "A reservation recommendation is not authority to sign a contract, migrate workloads, reduce reliability capacity, attribute waste to a person, or infer vendor misconduct."
  ],
  "method": "stochastic_integer_cloud_reserved_capacity_plan_v1",
  "scenario_diagnostics": [
    {
      "on_demand_units": 0,
      "probability": 0.5,
      "scenario_id": "high",
      "spot_units": 0,
      "total_cost": 8,
      "unserved_units": 0,
      "unused_reserved_units": 0
    },
    {
      "on_demand_units": 0,
      "probability": 0.5,
      "scenario_id": "low",
      "spot_units": 0,
      "total_cost": 8,
      "unserved_units": 0,
      "unused_reserved_units": 10
    }
  ],
  "selected_reservation_offers": [
    {
      "capacity_units_per_contract": 10,
      "contract_count": 1,
      "offer_id": "annual-reservation",
      "start_period": 0,
      "term_periods": 2
    }
  ],
  "solver": {
    "evaluated_plan_count": 2,
    "global_optimality_certificate": true,
    "maximum_exact_states": 100000,
    "method": "exact_integer_enumeration",

Truncated for display — the full payload is 64 lines.

How it works

Constrained optimization — Pick the best feasible option under real limits — budget, headcount, dependencies, capacity — rather than ranking a list and hoping it fits.

  1. 1 Freeze reservation quotes with start, term, capacity, upfront/recurring price and purchase limit, plus coherent period demand, reservation realization, spot/on-demand price and fallback-capacity scenarios.
  2. 2 Enumerate integer contract counts inside the state boundary or construct a deterministic forward-addition supported set; allocate realized reserved capacity first and then the cheapest genuinely available fallback without inventing supply.
  3. 3 Price commitments, fallback, unused reservation, and unserved business loss; apply coverage and CVaR gates and compare the selected plan with the unreserved fallback portfolio.

Before you trust it

Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.

Assumptions & guardrails

  • Objectives use commensurable locally governed value units, constraints reflect real feasibility, and uncertainty covers plausible adverse inputs.
  • Quotes are executable on one service/region/currency horizon; demand and all capacity/price paths share scenario identity; reservation realization and spot interruption are calibrated; unserved-unit value covers the relevant business loss.
  • The recommendation is optimal only for its stated objective, feasible set, evidence, and solver guarantee; it is not a universal management optimum.
  • Heuristic mode is not globally optimal; a recommendation is not contract signature, workload migration, reliability reduction, waste attribution to a person, or vendor-misconduct evidence.

Minimum evidence

  • reservation_offers: at least 1 rows/items
  • demand_scenarios: at least 2 rows/items
  • value_per_unserved_unit: required and organization-defined

How to validate it

Backtest the chosen action against simple feasible baselines on held-out scenarios, sweep costs/constraints/risk tolerance, and require constraint feasibility under adverse inputs.

Calibrating it to your org

Same for everyone

The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.

Specific to you

  • versioned FinOps service-boundary forecast joining metered eligible demand, normalized quotes, commitments/credits, workload placement constraints, fallback capacity/interruption, and business loss from unserved units
  • service/region/currency/horizon, eligible demand denominator, quote and tax treatment, reservation realization, fallback ordering/capacity, unserved value, coverage/upfront/CVaR gates, risk aversion, solver boundary, and procurement authority

Calibration workflow

  1. 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
  2. 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
  3. 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
  4. 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
  5. 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
  6. 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.

Call it from your AI

You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.

gitrevio_capabilities_search
  { "q": "choose an integer portfolio of dated" }
  → finds "optimize_cloud_reserved_capacity"

gitrevio_capability_describe
  { "capability_id": "optimize_cloud_reserved_capacity" }
  → returns the input schema and agent guidance shown on this page

gitrevio_capability_run
  { "capability_id": "optimize_cloud_reserved_capacity", "arguments": { ... } }
  → returns the result shown above

Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.

Related tools

Audit cash flow timing consistency

Audit whether economic-event and cash-settlement timing obey governed lag rules across coherent scenarios, quantify the resulting NPV distortion, reconstruct scenario liquidity paths, and separate timing exceptions from liquidity-tail exposure without treating exceptions as wrongdoing.

Statistical audit & measurement

Optimize enterprise technology capital plan

Optimize a two-stage enterprise technology portfolio that commits initial capital now and allocates follow-on capital only after observable signals; enforce non-anticipativity, dependencies, exclusions, signal-specific budget/capacity and eligibility, compare with the best one-shot portfolio, quantify option value and CVaR loss, and disclose solver certainty.

Constrained optimization

Audit benefit double counting

Reconcile business-case benefit claims to unique economic source pools and allocation fractions, exposing overallocated sources and claim-level mismatches before portfolio value is aggregated.

Constrained optimization

Audit cost allocation consistency

Audit whether shared engineering, platform, cloud, vendor, or operating cost pools reconcile to source totals and follow their declared pro-rata allocation bases at every target.

Statistical audit & measurement

Audit cost capitalization sensitivity

Audit whether permitted software-cost capitalization choices change reported project ROI and priority even though scenario cash NPV, downside, and economic rank are unchanged.

Statistical audit & measurement

Audit delivery to cash chain integrity

Reconcile each governed milestone from delivery-ready evidence through customer acceptance, billing eligibility, net invoicing and collected cash; enforce temporal ordering, eligible-unbilled and outstanding-receivable identities, evidence separation and bounded diagnostics without treating Git activity as an accounting fact.

Statistical audit & measurement

See every tool in Finance & unit economics →

Ready to See Your Engineering work clearly?

Request a free demo