You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/agents/how-to/tools/model-context-protocol-samples.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ ms.custom: azure-ai-agents-code
17
17
18
18
Use this article to find step-by-step instructions and code samples for connecting Foundry Agent service with MCP.
19
19
20
-
Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api#api-call-information) to set the right values for the environment variables `AGENT_TOKEN`, `AZURE_AI_FOUNDRY_PROJECT_ENDPOINT` and `API_VERSION`.
20
+
Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api#api-call-information) to set the right values for the environment variables `AGENT_TOKEN`, `AZURE_AI_FOUNDRY_PROJECT_ENDPOINT`, and `API_VERSION`.
21
21
22
22
23
23
## Create an Agent with the MCP tool enabled
@@ -69,11 +69,12 @@ curl --request POST \
69
69
## Create a run and check the output
70
70
71
71
Create a run to pass headers for the tool and observe that the model uses the Grounding with Bing Search tool to provide a response to the user's question.
72
-
`require_approval` parameter is optional. if not provided, `always` is the default value, meaning each time developer needs to approve before calling. Supported values:
73
-
1. `always` by default
74
-
2. `never` meaning no approval is required
75
-
3. `{"never":[<tool_name_1>, <tool_name_2>]}` you can also provide a list of tools without required approval
76
-
4. `{"always":[<tool_name_1>, <tool_name_2>]}` you can provide a list of tools with required approval
72
+
`require_approval` parameter is optional. If not provided, `always` is the default value, meaning each time developer needs to approve before calling. Supported values:
73
+
74
+
-`always` by default
75
+
-`never` meaning no approval is required
76
+
-`{"never":[<tool_name_1>, <tool_name_2>]}` you can also provide a list of tools without required approval
77
+
-`{"always":[<tool_name_1>, <tool_name_2>]}` you can provide a list of tools with required approval
77
78
78
79
```bash
79
80
curl --request POST \
@@ -104,7 +105,7 @@ curl --request GET \
104
105
-H "Authorization: Bearer $AGENT_TOKEN"
105
106
```
106
107
107
-
If the model is trying to invoke a tool in your MCP server with approval required, you will get a run with `require_action` status.
108
+
If the model is trying to invoke a tool in your MCP server with approval required, you get a run with `require_action` status.
108
109
```bash
109
110
{
110
111
"id": "run_123",
@@ -141,7 +142,7 @@ If the model is trying to invoke a tool in your MCP server with approval require
141
142
Make sure you carefully reviewed the tool and argument(s) to be passed and make an informed decision for approval.
142
143
143
144
## Submit your approval
144
-
If you decide to approve, you need to set the `approve` parameter to be `true` with the `id` for tool calls above.
145
+
If you decide to approve, you need to set the `approve` parameter to be `true` with the `id` for the preceding tool calls.
0 commit comments