All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.functions.annotation.McpToolTrigger Maven / Gradle / Ivy

Go to download

This package contains all Java interfaces and annotations to interact with Microsoft Azure functions runtime.

The newest version!
package com.microsoft.azure.functions.annotation;

import java.lang.annotation.*;

/**
 * Annotation to bind a parameter to an input from the MCP Tool Trigger.
 * 

* This trigger is used to fetch code snippets or perform actions based on the MCP tool's behavior. * When applied to a parameter, it enables the Azure Function to be triggered by the * custom "mcpToolTrigger" extension with the specified configuration. *

*/ @CustomBinding( direction = "in", name = "context", type = "mcpToolTrigger" ) @Target({ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface McpToolTrigger { /** * The name of the tool being invoked. * This should match the tool identifier that the extension will use * to route and execute the correct functionality. * * @return the name of the tool */ String toolName(); /** * A description of the tool or its intended function. * This may be used in UI or documentation to help users understand * what the trigger does. * * @return the tool's description */ String description() default ""; /** * A JSON array string defining the properties required by the tool. * Each item should be an object with the following keys: * - propertyName: the name of the input * - propertyType: the expected type (e.g., string, int) * - description: an explanation of what the property represents * * Example: *
     * [{"propertyName":"snippetname","propertyType":"string","description":"The name of the snippet."}]
     * 
* * @return a JSON string describing tool properties */ String toolProperties() default ""; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy