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.

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.
| Step | Parameters | Spends? | Who sets the number |
|---|---|---|---|
| Preview | dry_run=true | No | Sume returns an estimate |
| Review | Estimate in your prompt | No | Decision model says yes or no |
| Submit | idempotency_key, max_spend_usd | Yes | Your 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
- Entity error 14.41%? Score your own call audio with Sume STT in Python
AssemblyAI reports 14.41% entity error on voice-agent audio and 3.44% English WER. Neither is yours. Compute entity recall on 20 of your clips with Sume STT.
- AssemblyAI word boost cuts name errors 61%: a term map for Sume STT
AssemblyAI reports word boost cut entity errors 60.9% on names and 72.8% on technical terms. Sume STT has no boost field; here is a post-correction map.
- Assign a Sume video model to each old prompt by clip length
A short Python planner that reads a CSV of old prompt lengths, sends 10 seconds or less to Omni, up to 30 seconds to Wan 3.0, and splits longer clips.
- Audio detach errors: unsupported_media_type, source_not_found
Each Sume audio detach refusal code and its one-line fix: off-host URL, other workspace, not a video, empty range, no audio track, source too long.
Written by Sume