How the Order Management Assistant works
It works in Microsoft Teams. An AI model reads the question and calls one of six read-only tools on our MCP server. The server asks every connected distributor at once and merges the answers, so one question covers all of them. Every fact comes from tested code.
// .vscode/mcp.json
{
"servers": {
"order-management-assistant-demo": {
"type": "http",
"url": "<DEMO-URL>",
"headers": { "x-api-key": "<TEST-KEY>" }
}
}
}
curl <DEMO-URL> \
-H "x-api-key: <TEST-KEY>" \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {"name": "this_week", "arguments": {}}}'
# pip install "mcp>=2.3"
import asyncio
import httpx2
from mcp.client import Client
from mcp.client.streamable_http import streamable_http_client
URL = "<DEMO-URL>"
KEY = "<TEST-KEY>"
async def main():
http = httpx2.AsyncClient(headers={"x-api-key": KEY})
async with Client(streamable_http_client(URL, http_client=http)) as client:
result = await client.call_tool("this_week", {})
print(result.content[0].text)
asyncio.run(main())
At a glance
- Runs in
- Microsoft Teams, as a Copilot Studio agent
- Who can use it
- MDS staff we invite, signed in with Microsoft Entra ID
- AI model
- Claude, provided by Microsoft in Copilot Studio. The live demo uses Claude on Microsoft Foundry
- Tools
- 6 tools on our MCP server, all read-only
- Data
- Our distributors’ order and deal systems
- Hosting
- Azure App Service, run by MDS
How it answers a question
- A person asks in Teams, signed in with Microsoft Entra ID. The agent’s AI model reads the question.
- The model picks a tool by its name and description, and calls it on our MCP server. MCP (Model Context Protocol) is an open standard that lets an AI model call tools on a server.
- The tool asks every connected distributor at once, applies our business rules, and returns facts. Each order names its distributor, and if a distributor doesn’t answer, the result says so.
The AI model never decides a fact or a number. Those come from code that has unit tests. The model only picks the tool and words the answer.
Architecture
Tools
Six tools, one for each question the team asks most. Each one is marked read-only, and the server has no tool that places, changes or cancels an order.
| Tool | Ask it | Inputs | What it returns | Limits |
|---|---|---|---|---|
this_week | “What needs my attention this week?” | None | Deals that expire within 7 days, how many lapse within 14, and how many orders look stuck | A summary: the other tools give the details |
deals_to_follow_up | “Who do I call first? I only have time for three calls.” | days, optional: 1 to 90 (default 14) | The deals that expire within that many days, grouped by customer, the customers with the most first | Three calls: the top three customers, then the others by name |
aging_deals | “Which deals have been dragging longest?” | None | The deals revised most often, most revised first, with their expiry dates | Each revision counts, so the most revised deals have dragged longest |
customer_brief | “Brief me on Woodgrove Bank.” | customer: a name | Its deals by vendor, which ones lapse soon, and its recent orders at every distributor | Matches every word of the name, in any case |
find_order | “Where is PO 700245?” | po_number, or customer: a name | Every spelling of the PO together (700245 and 700245A), with each order’s status, distributor and age | If nothing matches, it says that an older order can still exist |
stuck_orders | “Is anything stuck?” | None | Orders that shipped weeks ago but were never marked delivered, are still processing after many days, or are on hold, back-ordered or in credit review | Biggest totals first, each with its distributor |
Test it yourself
Both ways use our demo server. It runs the same code and tools on made-up data for Trey Research, a made-up reseller, and three made-up distributors. No real client or distributor data is on it.
In your browser
Ask the live demo your own questions. A real AI agent picks the tool and writes the answer.
Try DemoWith your own MCP client
We send you the demo server’s address and a test key. Put them in place of <DEMO-URL> and <TEST-KEY> in the samples at the top of this page. Any MCP client that can send a header works, for example VS Code.
Ask the questions it was made for
- What needs my attention this week?
- Who do I call first? I only have time for three calls.
- Is anything stuck?
- Where is PO 700245?
- Where is the Fabrikam hardware?
- Which deals have been dragging longest?
- Brief me on Woodgrove Bank.
You askWhat needs my attention this week?
The model callsthis_week {}
The tool returnsDeals that expire within 7 days: 4.
- 1 Proseware deal for Northwind Traders expires tomorrow: DL-24001.
- 2 Litware deals for Woodgrove Bank expire in 3 days: DL-24014, DL-24027.
- 1 A. Datum deal for Contoso Pharmaceuticals expires in 6 days: DL-24040.
Deals that lapse within 14 days: 10, at 4 customers.
Stuck orders: 5 orders, $41,595.40.
The model then writes a short answer from this text.
| In Teams | Demo server | |
|---|---|---|
| Code, tools and rules | Ours | The same |
| Data | Our distributors’ systems | Made up, for Trey Research and three made-up distributors |
| Who can use it | MDS staff we invite, signed in | Anyone, in the live demo. With your own client: anyone with a test key |
| AI model | Claude, in Copilot Studio | Claude on Microsoft Foundry in the live demo, or the model in your MCP client |
| Key | Private | A test key from us |
Limits
- It only reads. No tool can place, change or cancel an order or a deal, so a person makes every change in the distributor’s own portal.
- If a distributor doesn’t answer, the result names it and leaves its data out, so a partial answer never looks complete.
- The demo answers a limited number of questions each day, and we can change test keys at any time.
Want one for your team?
Tell us how your team works today, and we’ll show you what this assistant could do.