Tools

Anatomy of a tool call

An end-to-end tool call. The model never talks to the server: the host is always in between.

UserHost + clientthe AI appLLMMCP servercalculator1. “What is 48213 + 97356?”2. prompt + tool schemasfrom an earlier tools/list3. call add{ a: 48213, b: 97356 }Host may ask the user to approve the call4. tools/calladd { a: 48213, b: 97356 }5. a + b6. result contenttext "145569" + { result: 145569 }7. tool result"145569"8. final answer9. “It’s 145,569”

9 / 28