Design a tool schema strategy for a growing AI platform.

Instruction: Define a narrow tool contract with input validation, semantic checks, and versioned output behavior. v1 request is {"order_id":"O1","amount_cents":1250,"currency":"USD"}. Proposed v2 is {"order_id":"O1","amount":"12.50","currency":"USD"}, where amount is a decimal string in major units. O1 has only $10 refundable. Specify adapter behavior and business result.

Context: Choose how a platform should describe and evolve tool inputs and outputs as teams add more integrations.

Updated

Official answer available

Read the opening below, then unlock the full answer and practical guidance.

I would organize tools around user actions, with one clearly described purpose per operation. For a refund tool, I would define required fields, currency representation, amount limits, and a result that distinguishes completed, rejected, and pending refunds. The backend also checks the order's refundable balance and the caller's permission.

JSON...

Your preparation path

Work through these questions in order. Read the answer aloud, then explain it in your own words.

Related Questions