Technical details

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

  1. A person asks in Teams, signed in with Microsoft Entra ID. The agent’s AI model reads the question.
  2. 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.
  3. 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

Copilot StudioMicrosoft runs it · MDS sets it upOur MCP serverAzure App Service · MDS runs itDistributorseach runs its own systemasks in Teamstool callHTTPS + API keycalls the toolapplyaskfactsClientan invited userMicrosoft Entra IDusers sign in firstMicrosoft Teamswhere the team asksAgent · ClaudeMicrosoft-provided modelinstructions shape the wordingMCP toolsends the inputs and an API keyTool resultfacts and notes, by distributorAnswershort · from the tool’s factsRead-only by designno tool places, changes or cancels an orderthe website demo runs this code on made-up data/mcp endpointchecks the API keySix toolsthis_week · deals_to_follow_up · aging_dealscustomer_brief · find_order · stuck_ordersBusiness rulesdecide every factunit-testedConnectorsone per distributorall asked at onceDistributor Aits own systemDistributor Bits own systemDistributor Cits own system123456
Figure 1. Who runs what. Steps 1–6 follow one question. Microsoft runs Copilot Studio. MDS runs the MCP server. Each distributor runs its own system, shown here with three, as in the live demo. Every call to a distributor is a round trip: the question goes out, and the data comes back.
callsasksdatano answerTool callfor example stuck_ordersfrom the agentConnectorsask every distributorat once, read-onlyDistributor AansweredDistributor BansweredDistributor Cdidn’t answer this timeBusiness rulesone list from every answereach order keeps its distributornames any that didn’t answerTool result“… at Distributor A orDistributor B. Distributor C didn’tanswer, so its data isn’tincluded.”
Figure 2. One question, every distributor. The tool asks each connected distributor at once and merges what comes back into one list. Each item keeps its distributor’s name, and a distributor that doesn’t answer is named, so a partial answer never looks complete. Dashed: a distributor that didn’t answer.
Agent Board websiteAzure Static Web Apps · anyone can visitOur demo serverAzure App Service · MDS runs itMicrosoft servicesthe AI modelasksHTTPSquestion, toolsanswercalls a toolreadsVisitorany browser, no sign-inTry Demo pagesends the question as text/chat endpointdaily limits · holds the model key · browsers: our site onlyDemo agentthe real agent’s instructions, for a made-up resellerToolsthe real agent’s coderead-onlyTest datagenerated, made upa reseller, 3 distributorsClaudeMicrosoft Foundrypicks the tool, writes the answerDistributors’ systemsno connection from the demo1234
Figure 3. The live demo. Steps 1–4 follow one question. The demo server runs the real agent’s code on made-up test data for a made-up reseller and three made-up distributors, and Claude on Microsoft Foundry picks the tool and writes the answer. The demo has no connection to any distributor. The icons in these figures are Microsoft’s official architecture icons.

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.

ToolAsk itInputsWhat it returnsLimits
this_week“What needs my attention this week?”NoneDeals that expire within 7 days, how many lapse within 14, and how many orders look stuckA 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 firstThree calls: the top three customers, then the others by name
aging_deals“Which deals have been dragging longest?”NoneThe deals revised most often, most revised first, with their expiry datesEach revision counts, so the most revised deals have dragged longest
customer_brief“Brief me on Woodgrove Bank.”customer: a nameIts deals by vendor, which ones lapse soon, and its recent orders at every distributorMatches every word of the name, in any case
find_order“Where is PO 700245?”po_number, or customer: a nameEvery spelling of the PO together (700245 and 700245A), with each order’s status, distributor and ageIf nothing matches, it says that an older order can still exist
stuck_orders“Is anything stuck?”NoneOrders that shipped weeks ago but were never marked delivered, are still processing after many days, or are on hold, back-ordered or in credit reviewBiggest 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 Demo

With 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 for a test key

Ask the questions it was made for

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 TeamsDemo server
Code, tools and rulesOursThe same
DataOur distributors’ systemsMade up, for Trey Research and three made-up distributors
Who can use itMDS staff we invite, signed inAnyone, in the live demo. With your own client: anyone with a test key
AI modelClaude, in Copilot StudioClaude on Microsoft Foundry in the live demo, or the model in your MCP client
KeyPrivateA test key from us

Limits

Want one for your team?

Tell us how your team works today, and we’ll show you what this assistant could do.