Function Calling UX
Synonyms: tool use UX, tool call UI, generative UI, agent action UI
Definition
search_flights or create_invoice, fills in the inputs, and gets the result back. Function calling UX decides what the user sees at each step: which tool runs, with what inputs, how long it takes, what came back, and what to do when it fails.Use cases
- The silent spinner: An agent makes 4 tool calls behind one "Thinking..." label. After 40 seconds the user refreshes and kills the run.
- JSON in the chat: The result shows up as
{"status":"ok","id":"inv_8812"}. Did the invoice go out? No idea.
- Wrong inputs, no preview: The model books Portland, Oregon. The user meant Portland, Maine, and never saw the inputs before the call ran.
How it's used in practice
- Name each call in plain words: Give each function a label, e.g. "Searching flights to Lisbon", shown the moment the call starts.
- Preview inputs before risky calls: "Book 2 seats, 14 Nov, $412" with Edit and Confirm.
- Render results as components: A flight card or table, built per tool.
- Design 4 states per tool card: Running, done, needs input, failed.
- Report partial success: "3 of 4 suppliers replied. Acme's API timed out." Name the failing service.
search and search_v2 cause wrong calls that show up as UI bugs in testing.Challenges & limitations
- Chains get noisy: One request can fire 10+ calls. Listing all of them buries the answer, and collapsing them hides what happened.
- Latency isn't yours: Third-party APIs set the wait. The UI can only report it.
- Designers rarely see the schema: Tool names and error formats get decided in engineering tickets.
Free resources
- OpenAI: Function calling guide — how models call your functions with JSON Schema inputs, including strict mode and multiple calls per response.
- Google AI for Developers: Function calling with the Gemini API — function declarations plus the auto, any, none, and validated calling modes.
- Smashing Magazine: Practical Interface Patterns For AI Transparency (Part 2) — Victor Yocco's step checklist, partial-success, and "disentangling the tool" patterns.
