Feedback

Chat Icon

Practical MCP with FastMCP & LangChain

Engineering the Agentic Experience

MCP Interaction Workflow: A Step-by-Step Example
22%

Step 4 - Reasoning, Decision-Making and Planning

The host application (e.g., Claude Desktop or a custom IDE) sends the user's prompt to the LLM: What's the air quality like today in San Francisco?

The LLM evaluates the request and must decide between:

  • Answering directly from its internal training data (static context).
  • Triggering a tool to fetch live, external data (dynamic context).

The LLM then performs internal reasoning:

To answer this, I need the current air quality. I have a 'get_air_quality' tool available. The tool requires a 'location' argument. The user mentioned 'San Francisco', which is a valid location. I will call `get_air_quality` with 'location' set to 'San Francisco'.

The LLM then generates a tool-use block. This is raw structured text (often JSON) containing the intent:

Practical MCP with FastMCP & LangChain

Engineering the Agentic Experience

Enroll now to unlock current content and receive all future updates for free. Your purchase supports the author and fuels the creation of more exciting content. Act fast, as the price will rise as the course nears completion!