From e50c140622dd9a8d4c280e0ecc32a568c71aec80 Mon Sep 17 00:00:00 2001 From: Ahmed Muhsin Date: Fri, 24 Oct 2025 17:29:40 -0500 Subject: [PATCH] add support for isRequired and adjust defaults --- pom.xml | 2 +- .../azure/functions/annotation/McpToolProperty.java | 11 +++++++++-- .../azure/functions/annotation/McpToolTrigger.java | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 1dedaa3..e6cf749 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.microsoft.azure.functions azure-functions-java-library - 3.2.1 + 3.2.2 jar com.microsoft.maven diff --git a/src/main/java/com/microsoft/azure/functions/annotation/McpToolProperty.java b/src/main/java/com/microsoft/azure/functions/annotation/McpToolProperty.java index 47ba5bc..33550b7 100644 --- a/src/main/java/com/microsoft/azure/functions/annotation/McpToolProperty.java +++ b/src/main/java/com/microsoft/azure/functions/annotation/McpToolProperty.java @@ -61,12 +61,19 @@ * * @return Description of the property */ - String description(); + String description() default ""; /** * Whether this property is required for tool execution. * * @return true if required, false if optional */ - boolean isRequired(); + boolean isRequired() default false; + + /** + * Whether this property is an array. + * + * @return true if this property is an array, false otherwise + */ + boolean isArray() default false; } diff --git a/src/main/java/com/microsoft/azure/functions/annotation/McpToolTrigger.java b/src/main/java/com/microsoft/azure/functions/annotation/McpToolTrigger.java index aa1eaec..8a7bd1f 100644 --- a/src/main/java/com/microsoft/azure/functions/annotation/McpToolTrigger.java +++ b/src/main/java/com/microsoft/azure/functions/annotation/McpToolTrigger.java @@ -64,7 +64,7 @@ * * @return Description of the tool's functionality */ - String description(); + String description() default ""; /** * JSON array defining expected tool properties.