Pydantic AI ToolCallJudge: check a Sume paid call before it runs

Pydantic AI 2.53.0 adds ToolCallJudge to assess tool calls before execution. Pair it with Sume's dry_run and max_spend_usd on paid calls.

5 min readSume
All posts

Add ToolCallJudge from Pydantic AI v2.53.0 (2026-10-02) in front of Sume's paid tools and make the judge check that the call carries a spend ceiling. The release describes it as a way to assess tool calls before execution, which is the right place to catch a missing max_spend_usd.

The judge reduces mistakes; it is not a guarantee, so Sume's own checks stay in the loop.

What 2.53.0 includes

The release adds ToolCallJudge, an AskUser capability that defers to the host with a timeout, and managed subagents in CLAI2.

At a glance

Checks before a paid Sume call, read 2026-10-03.
CheckEnforced by
idempotency_key presentSume server (required)
max_spend_usd setYour judge or policy (optional in Sume)
dry_run reviewedYour workflow
Scope mcp:write grantedSume OAuth consent

What the judge should look for

For Sume, the useful checks are mechanical: the call has an idempotency_key, max_spend_usd is set and within your budget, and dry_run was used first for anything new. Sume will reject a write or paid call that lacks idempotency_key, but it does not require the ceiling.

Wire the Sume server as an MCP toolset, then let the judge see the tool name and arguments.

  • Reject paid calls without max_spend_usd.
  • Allow read tools without review.
  • Use AskUser for anything the judge flags.

Limits and what is not verified

I did not run ToolCallJudge against a live Sume server, and the release notes do not describe the judge's interface in detail. Use Pydantic AI's docs for the code.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume