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/azure-functions/functions-bindings-mcp-resource-trigger.md
+8-14Lines changed: 8 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,7 @@ For information on setup and configuration details, see the [overview](functions
22
22
::: zone-end
23
23
24
24
::: zone pivot="programming-language-csharp,programming-language-python,programming-language-typescript,programming-language-javascript"
25
-
## Example 1
26
-
27
-
Example 1 shows how to use resource to implement the UI element of MCP Apps.
25
+
This first example shows how to use resource to implement the UI element of MCP Apps.
28
26
::: zone-end
29
27
::: zone pivot="programming-language-csharp"
30
28
@@ -81,9 +79,7 @@ public async Task<object> GetWeather(
81
79
82
80
For the complete code example, see [WeatherFunction.cs](https://github.com/Azure-Samples/remote-mcp-functions-dotnet/blob/main/src/McpWeatherApp/WeatherFunction.cs).
83
81
84
-
## Example 2
85
-
86
-
The following code creates an endpoint to expose a resource named `readme` that reads a markdown file and returns its contents as plain text. Clients can access this resource using the `file://readme.md` URI.
82
+
This code example creates an endpoint to expose a resource named `readme` that reads a markdown file and returns its contents as plain text. Clients can access this resource using the `file://readme.md` URI.
87
83
88
84
```csharp
89
85
privateconststringReadmeMetadata="""
@@ -217,10 +213,9 @@ app.mcpTool("getWeather", {
217
213
218
214
For the complete code example, see [weatherMcpApp.ts](https://github.com/Azure-Samples/remote-mcp-functions-typescript/blob/McpAppDemo/src/functions/weatherMcpApp.ts).
219
215
220
-
> [!NOTE]
221
-
> The MCP resource trigger for TypeScript requires version `4.12.0-preview.2` or later of the [`@azure/functions`](https://www.npmjs.com/package/@azure/functions/v/4.12.0-preview.2) package.
222
-
>
223
-
> The function app must include the preview extension bundle version `[4.32.0, 5.0.0)`. Check `host.json` to make sure the correct bundle version is specified:
216
+
> [!IMPORTANT]
217
+
> The MCP resource trigger for TypeScript currently requires version `4.12.0-preview.2` or later of the [`@azure/functions`](https://www.npmjs.com/package/@azure/functions/v/4.12.0-preview.2) package.
218
+
> It also requires version `[4.32.0, 5.0.0)` of the preview exetnsion bundle. Make sure to update your `host.json` to use this preview bundle and version:
224
219
>
225
220
> ```json
226
221
> "extensionBundle": {
@@ -294,17 +289,16 @@ For the complete code example, see [function_app.py](https://github.com/Azure-Sa
294
289
295
290
> [!NOTE]
296
291
> The MCP resource trigger for Python requires version `1.25.0b3` or later of the [`azure-functions`](https://pypi.org/project/azure-functions/1.25.0b3/) package.
297
-
>
298
-
> If the app is using Python 3.9 - 3.12, add the following app setting to `local.settings.json` if running locally or as an environment variable if running in production: `PYTHON_ISOLATE_WORKER_DEPENDENCIES: 1`.
299
-
>
300
-
> Using this feature requires the preview extension bundle version `[4.32.0, 5.0.0)`. Check host.json to make sure the correct bundle version is specified:
292
+
> It also requires version `[4.32.0, 5.0.0)` of the preview exetnsion bundle. Make sure to update your `host.json` to use this preview bundle and version:
> If the app is using Python 3.9-3.12, add the `PYTHON_ISOLATE_WORKER_DEPENDENCIES: 1` app setting to `local.settings.json` and to app settings when running in Azure.
0 commit comments