Skip to content

Commit d232491

Browse files
committed
Refine MCP resource trigger documentation for clarity and consistency in examples and notes
1 parent 670252b commit d232491

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

articles/azure-functions/functions-bindings-mcp-resource-trigger.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ For information on setup and configuration details, see the [overview](functions
2222
::: zone-end
2323

2424
::: 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.
2826
::: zone-end
2927
::: zone pivot="programming-language-csharp"
3028

@@ -81,9 +79,7 @@ public async Task<object> GetWeather(
8179

8280
For the complete code example, see [WeatherFunction.cs](https://github.com/Azure-Samples/remote-mcp-functions-dotnet/blob/main/src/McpWeatherApp/WeatherFunction.cs).
8381

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.
8783

8884
```csharp
8985
private const string ReadmeMetadata = """
@@ -217,10 +213,9 @@ app.mcpTool("getWeather", {
217213

218214
For the complete code example, see [weatherMcpApp.ts](https://github.com/Azure-Samples/remote-mcp-functions-typescript/blob/McpAppDemo/src/functions/weatherMcpApp.ts).
219215

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:
224219
>
225220
> ```json
226221
> "extensionBundle": {
@@ -294,17 +289,16 @@ For the complete code example, see [function_app.py](https://github.com/Azure-Sa
294289

295290
> [!NOTE]
296291
> 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:
301293
>
302294
> ```json
303295
> "extensionBundle": {
304296
> "id": "Microsoft.Azure.Functions.ExtensionBundle.Preview"
305297
> "version": "[4.32.0, 5.0.0)"
306298
> }
307299
> ```
300+
>
301+
> 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.
308302
309303
::: zone-end
310304

0 commit comments

Comments
 (0)