Agent Utilities

Shopping data cleanup

Normalize displayed prices and update a cart snapshot

Displayed prices may use different decimal separators, and an agent can overwrite the wrong cart entry if it applies an unguarded change. Normalize prices first, then test the expected record before editing its snapshot.

$0.0013 for one successful call to each of the 3 tools below.

Run the example

The Node.js 22+ recipe connects these three calls for you. Preview its input for free, then choose whether to execute with existing service credits.

SHA-256 checksum · Expected sample output · Recipe instructions · License notices · GitHub example

shasum -a 256 -c cart-workflow.mjs.sha256
node cart-workflow.mjs --preview cart-example.json

The sample updates coffee to €16.49 and a mug to €9.95. Two coffee bags, one mug, a €2 discount and €4.99 shipping give a known total of €45.92. Tax is unknown, so the final total remains null. The downloadable expected output is a local fixture, not a paid execution.

To use the service, set AGENT_UTILITIES_API_KEY privately in your process environment, then run:

node cart-workflow.mjs --execute cart-example.json

Execution makes up to three billed calls using your existing credits. Execution is capped at $0.0013 across the three calls. Each call has a server-enforced ceiling from the discovered price; a higher price is rejected before a new debit. Each completed step stays charged if a later step fails. The recipe returns each step's receipt and recovery information. After an uncertain result, recover that step with the MCP retry helper; rerunning the recipe creates new billable calls. It does not purchase credits or change a merchant cart.

01

Read the price with its declared format

Supply a supported locale, currency and decimal scale. For example, 1.234,56 € with de-DE, EUR and two decimal places becomes 1234.56. Check each returned valid flag; ranges, prose, conflicting currency tokens and excess precision remain errors. A shared $ symbol does not establish which dollar currency the merchant uses.

commerce.money-parse · $0.0003 per call ↗
02

Guard changes to the supplied snapshot

Use a test operation on the expected SKU or currency before replacing a price or quantity. Map only a valid normalized amount into the patch value. Array additions insert at an index; /- appends. If any operation fails, no result is committed and the original supplied snapshot is unchanged. This tool does not write to a merchant cart or place an order.

data.json-patch · $0.0005 per call ↗
03

Recalculate explicit components

Map the updated snapshot into the item schema, including unitPrice, quantity and discount. Supply the same declared currency and decimal scale. Keep unavailable shipping, tax and fees as null. A known subtotal is not a complete checkout total until every component is supplied.

commerce.price-components · $0.0005 per call ↗

What you get

Normalized price strings, a guarded JSON snapshot and an exact reconciliation. Each operation is a separate call; currency selection, product identity and permission to modify a real cart remain the caller's responsibility.

These are separate API calls that your agent orchestrates, not an automatic bundled workflow. Review each tool's example and contract; input fields must be mapped explicitly between steps.

A small first step

Pick a useful tool.
Give it a real task.

Review its example and price, then create an API key and save your recovery key. Add $5 in service credits through Stripe and call the API from your agent.