Tool result formatting — CCA-F Exam Prep

PencilPrepPencilPrep
L2.10|Tool result formatting
1/12
Mystery
A customer service chat. Customer: 'Where is my latest order?' Claude: 'Your tracking number is 1Z999AA10123456784 and it's currently in transit.' The customer's actual latest order has a completely different tracking number. On the side, a massive JSON blob with hundreds of orders is visible. Claude picked the wrong one. Red circle highlighting the mismatch.

Claude gave the customer a tracking number. Confidently. It was from the wrong order.

The customer asked: 'Where is my latest order?' The agent called get_order_history. The tool returned everything: 247 orders spanning 3 years. Each order had 15+ fields: line items, addresses, payment methods, shipping events, refund records. 50KB of JSON.

Claude needed one thing: the tracking number for the most recent order. But buried in 50KB of nested JSON, 'most recent' wasn't obvious. The orders weren't sorted. The dates were in different formats. Claude picked a tracking number. It was from order #47.

The data was correct. The format made it impossible to use.