-
|
Hi, I noticed that in the example repository, the implementation first makes a GET /tools request to set up the MCP clients. Then it passes those tools to a POST /chat request which then sets up those MCP clients again. Isn't it redundant to do this twice? Can't you just skip directly to the POST /chat request that sets up the MCP clients? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi @gracew99 I presume you mean this sample https://github.com/azure-samples/azureai-travel-agent-python GET /tools is for tool discovery/UI: list available MCP tools, validate connectivity, and surface schemas for debugging or UX. The duplication is intentional, not a bug, clients aren’t trusted as the source of truth. You can skip GET /tools if you’re building a pure API with no UI/inspection needs; just use POST /chat. Best practice |
Beta Was this translation helpful? Give feedback.
-
|
Thanks Lee!
…On Mon, Feb 2, 2026 at 5:22 PM Lee Stott ***@***.***> wrote:
Hi @gracew99 <https://github.com/gracew99> I presume you mean this sample
https://github.com/azure-samples/azureai-travel-agent-python
*GET /tools* is for tool discovery/UI: list available MCP tools, validate
connectivity, and surface schemas for debugging or UX.
*POST /chat* is the authoritative runtime: the server must attach MCP
tools again to ensure correct config, auth, approvals, and freshness.
The duplication is intentional, not a bug, clients aren’t trusted as the
source of truth.
You can skip GET /tools if you’re building a pure API with no
UI/inspection needs; just use POST /chat.
*Best practice*
Keep GET /tools lightweight/read-only (cached discovery), keep POST /chat
self‑contained for execution.
—
Reply to this email directly, view it on GitHub
<#302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHC4MCAM5YXU3X4BVAXT4AT4J7EZTAVCNFSM6AAAAACTHGBQKOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNRXG4ZTKNA>
.
You are receiving this because you were mentioned.Message ID:
<microsoft-foundry/discussions/repo-discussions/302/comments/15677354@
github.com>
|
Beta Was this translation helpful? Give feedback.
Hi @gracew99 I presume you mean this sample https://github.com/azure-samples/azureai-travel-agent-python
GET /tools is for tool discovery/UI: list available MCP tools, validate connectivity, and surface schemas for debugging or UX.
POST /chat is the authoritative runtime: the server must attach MCP tools again to ensure correct config, auth, approvals, and freshness.
The duplication is intentional, not a bug, clients aren’t trusted as the source of truth.
You can skip GET /tools if you’re building a pure API with no UI/inspection needs; just use POST /chat.
Best practice
Keep GET /tools lightweight/read-only (cached discovery), keep POST /chat self‑contained for execution.