Improve MCP Extension Support#2551
Merged
Flanker32 merged 15 commits intomicrosoft:developfrom Nov 2, 2025
Merged
Conversation
Flanker32
reviewed
Sep 15, 2025
...in/java/com/microsoft/azure/toolkit/lib/legacy/function/handlers/McpAnnotationProcessor.java
Show resolved
Hide resolved
Flanker32
reviewed
Sep 15, 2025
...in/java/com/microsoft/azure/toolkit/lib/legacy/function/handlers/McpAnnotationProcessor.java
Outdated
Show resolved
Hide resolved
Flanker32
reviewed
Sep 15, 2025
...in/java/com/microsoft/azure/toolkit/lib/legacy/function/handlers/McpAnnotationProcessor.java
Outdated
Show resolved
Hide resolved
Member
|
@ahmedmuhsin Thanks for your efforts, the PR look fine. One more question about the template, shall we add a return value to the function so that it could return something to mcp clients? Currently the void function will return empty to mcp clients, while usually mcp tools should return some messages. |
…ty and mcptooltrigger
Removed unnecessary comment
Flanker32
approved these changes
Nov 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for MCP (Model Context Protocol) annotations in Azure Functions and refactors binding name handling to improve consistency and validation. The most significant changes are the addition of MCP-related binding types and annotation processing, centralization of system-reserved binding name logic, and stricter validation for user-defined binding names.
MCP Annotation Support
McpToolTrigger,McpToolProperty) to theBindingEnumand their corresponding annotation constants inAzureFunctionsAnnotationConstants.java. [1] [2]McpAnnotationProcessor.java, which processes MCP annotations by patching trigger and property bindings, aggregates tool properties, and ensures correct function.json generation.AnnotationHandlerImpl.java.Binding Name Handling and Validation
$return) inAzureFunctionsAnnotationConstants.javaand updated all usages to reference this constant instead of hardcoding the string. [1] [2] [3] [4] [5] [6] [7] [8] [9]AnnotationHandlerImpl.javato ensure all user-defined binding names within a function are unique, while allowing duplicates for system-reserved names like$return.Dependency Update
azure-functions-maven-plugin/pom.xmlfrom1.39.0to1.40.0.