Azure / Azure/azure-sdk-for-python

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

Abierto
#44,579 10 comentarios 0 reacciones 2 asignados Reclamado por @howieleung Ver en GitHub
AI Projects customer-reported needs-team-attention question Service Attention
Lenguaje dominante
Python
Estrellas
5.6k
Forks
3.4k
Merge medio
2 d
PR fusionados (30 d)
217

Descripción

- **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**?

---

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.