By lesson 6, we already have an MCP server and client working.
Now we add a classic enterprise use case: retrieval from structured business data.
Lessons in this series
Before you start (self-setup)
If you’re following along on your own, complete lesson 0 and lesson 5 first.
This lesson introduces a new Azure dependency: Storage Tables.
Self-setup: Azure Table Storage + seed data
- Create a Storage account in Azure.
- In that account, create three tables:
FigurinesOrdersOrderFigurines
- Get a connection string and save it:
dotnet user-secrets set "AzureStorage:ConnectionString" "<your-storage-connection-string>"
- Seed the data.
- The workshop repo includes a dataloader project in
6-rag/dataloaderyou can run to populate sample data. - If you prefer, you can insert rows manually with Storage Explorer.
- The workshop repo includes a dataloader project in
Quick verification: confirm order 66 exists before testing StarWarsPurchaseTool.
What this lesson adds
A new MCP tool (StarWarsPurchaseTool) that queries Azure Table Storage to retrieve figurine order data.
The model can then answer questions like:
- what was in order 66?
- what did Ben Smith purchase?
- show orders for a specific character
RAG is broader than document search
A lot of people hear “RAG” and think vector DB + embeddings.
This lesson is a good reminder that RAG simply means augmenting generation with retrieved data, and that retrieval source can be:
- relational/NoSQL tables
- APIs
- docs
- search systems
Here it’s plain table queries plus deterministic filtering logic.
Data shape and tool design
The workshop uses three tables:
FigurinesOrdersOrderFigurines
The tool accepts optional filters:
orderNumbercharacterNamecustomerName
Then combines data into a JSON payload the model can reason over.
This is exactly the pattern I like for production tools: perform strict filtering in code, let the model focus on explanation and narrative.
Practical implementation notes
The lesson adds:
Azure.Data.Tablespackage- helper functions for query composition
- explicit error responses for bad inputs / no matches
The case-sensitive lookup note in the workshop is also an important real-world reminder: retrieval quality starts with query normalization rules.
Suggested banner prompt
A high-detail sci-fi data-vault scene with holographic tables of orders and figurines floating above a console while an AI assistant correlates records into a clear response stream. Cool cyan and purple palette, cinematic lighting, no text, no logos.
Follow along
Workshop source for this lesson: Lesson 6 README.
Next up: multi-modal AI with image generation tools.
Note: Original workshop repository: jimbobbennett/StarWarsCopilot.
