Skip to main content

Refund Desk: Choose a Tool Call, Not a JSON Wish

Select function calling with strict parameters when structured output is meant to trigger an external action.

structured-outputs-tool-use5 min read

A refund action is about to leave the chat layer and touch the payment system. The model must help with refund requests, and approved cases can move real money. Which design gives the safest execution boundary? Define an issue_refund tool with strict parameters, validate business rules in the payment service, then execute. Right. Tool calling separates model selection from application execution, and strict parameters make the action request checkable before money moves. Ask for a JSON object with refund: true and let the payment worker infer the missing fields. Weak. Inference inside the worker creates hidden defaults. A tool schema…

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Contact us