Eligibility is application logic
An order outside the sample 30-day return window cannot create a return draft. Tool descriptions are instructions; the handler is what enforces this rule.
Industry playground / Customer support
Look up a sample order, check return eligibility, and draft a request without sending it.
What this example teaches
An order outside the sample 30-day return window cannot create a return draft. Tool descriptions are instructions; the handler is what enforces this rule.
The fixture includes an order ID and items, with no personal address or payment data. A real implementation must authenticate the requester before exposing any order.
Common questions
No. Drafts and the final demo confirmation remain local to the page.
The handler rejects ineligible items before updating state. A production service must enforce the same rule on its server.
API references reviewed September 7, 2026.Chrome imperative API