Tool-calling agents
Describe your tools with the standard tools parameter and let Grok 4.3 choose which one to call and with what arguments. Log each call and check the arguments against your API schema before it runs anything that changes data.
Example: Which tool should handle this ticket?
Material
- Tools
- get_order(order_id) · refund_order(order_id, reason) · update_address(order_id, address)
- Customer
- Order 58213 arrived with a cracked screen. I’d like my money back, please.
PromptUsing the available tools and the customer message, choose one tool call and fill in its arguments. If information is missing, ask for it instead of guessing.
Sample answer · written by hand to show the reasoning
Call refund_order with order_id "58213" and reason "Item arrived damaged (cracked screen)". The customer gave the order number and a clear reason, so no follow-up question is needed. If your policy requires a photo for damage refunds, call get_order first and ask for the photo before refunding.