Azure / Azure/azure-sdk-for-python

MCP tool approval in Workflows: how to approve `mcp_approval_request` events

Aperta
#44,579 10 commenti 0 reazioni 2 assegnatari Rivendicata da @howieleung Vedi su GitHub
AI Projects customer-reported needs-team-attention question Service Attention
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
202

Descrizione

- **Package Name**: azure-ai-projects
- **Package Version**: 2.0.0b2
- **Operating System**:
- **Python Version**:

### Describe the bug
When running an agent workflow that uses an MCP tool requiring approval, the SDK emits
`mcp_approval_request` events during streaming — but it is unclear how a workflow is expected
to **respond to and approve** that request.

There does not appear to be a documented or discoverable flow to provide approval for a specific
`mcp_approval_request` within a workflow execution.

---

### Context
I am using the Azure SDK for Python to run an agent workflow that includes an MCP tool.

While streaming workflow execution events, I observe the following sequence:

```
Workflow created (id: mcp-tool-workflow:2, name: mcp-tool-workflow, version: 2)
Created conversation (id: conv_61a37b3058e19aab00f2sPt5yfJe074bd5kgTntiOeCG9BRhZK)
response.created
response.in_progress
response.output_item.added
workflow_action
response.output_item.added
mcp_list_tools
response.mcp_list_tools.in_progress
response.mcp_list_tools.completed
response.output_item.done
mcp_list_tools
response.output_item.added
mcp_approval_request
response.output_item.done
mcp_approval_request
response.completed
```

There is no clear way to approve or deny that request programmatically.

---

### Question
**How is an MCP approval request supposed to be handled in a workflow?**

Specifically:
1. How does the SDK expect clients to **identify** the approval request?
2. What API should be called to **approve or deny** that request?
3. How is approval **bound to a specific workflow execution**?

---

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.