Interactive tool-call flow · get_weather("Brno")

♙
User
⚙
Client / Agent
(tool orchestrator)
🧠
LLM
(reasoning model)
▱
MCP Server
(tool provider)
☁
Weather API
(external service)
1
User request"What's the weather
in Brno?"
2
Send user messagewith available tools
• user message
• tool definitions
(e.g. get_weather via MCP)
3
Decide to call toolReply with tool call
{ "tool_call": { "name": "get_weather", "arguments": {"location": "Brno"} } }
4
Call tool via MCPget_weather({"location":"Brno"})
5
Request weather dataGET /weather?location=Brno
6
Weather data response
7
Tool result (via MCP)
{ "location": "Brno", "temperature": 18, "condition": "Partly cloudy" }
8
Send tool resulttool result message
{ "location": "Brno", "temperature": 18, "condition": "Partly cloudy" }
9
Generate final answerUse tool result to craft reply
"The weather in Brno is 18°C and partly cloudy."
10
Return final answer"The weather in Brno is 18°C
and partly cloudy."