Ask a decision model to approve a Sume dry_run estimate before paying

Call the paid MCP tool with dry_run true, hand the estimate to a yes/no decision, and only then send idempotency_key with a max_spend_usd that you set.

5 min readSume
All posts

Yes, as a reviewer, not as the limit. Call the paid tool with dry_run=true to get the estimate, ask a decision model whether the job is worth that price, and only on a yes send the real call with an idempotency_key and a max_spend_usd that you computed. The ceiling stays a number in your code.

Three calls, one spend

The three calls have different effects. Only the last spends.

Review flow on a paid MCP tool (read 2026-10-05)
StepParametersSpends?Who sets the number
Previewdry_run=trueNoSume returns an estimate
ReviewEstimate in your promptNoDecision model says yes or no
Submitidempotency_key, max_spend_usdYesYour code, from the estimate
def ceiling(estimate_usd: float, margin: float = 1.1) -> float:
    if estimate_usd <= 0:
        raise ValueError("estimate must be positive")
    return round(estimate_usd * margin, 2)


def submit_args(estimate_usd: float, approved: bool, key: str) -> dict | None:
    if not approved:
        return None
    return {"idempotency_key": key, "max_spend_usd": ceiling(estimate_usd)}


print(submit_args(0.40, True, "job-123-v1"))
print(submit_args(0.40, False, "job-123-v1"))

Do not skip the cap

max_spend_usd is enforced only when sent, so do not let the model's yes replace it. The model approves the idea and your number caps the spend. Read the MCP tools and gates page for the exact parameter names on each tool.

Check the docs before you ship

Sume's limits and field names change faster than blog posts do. Read the linked docs pages for the current request fields before you ship, and send a dry_run or a low spend cap on your first real call.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume