2 min lesson
Build one bounded refund tool
Define one local refund tool, reject invalid calls in execute and verify a repeated request cannot refund twice.
Step 1 of 2
Use a test order and a stub payment service. Register only issue_refund in local.customTools. Give it a description and an inputSchema that requires order_id, amount_cents and idempotency_key, rejects extra properties and constrains the amount to a positive integer. In execute, load the order, check that the service identity may refund it and compare the amount with the refundable balance. Record toolCallId with the result. Send one valid call, then repeat the same idempotency key and try an order the identity does not own. local.autoReview can screen other supported local calls, but it does not supply application authorization and custom tools do not prompt for approval.
Learn more
Optional practice
Test yourself on Build one bounded refund tool
QWhat proves the refund tool kept its boundary?