Annotation Interface ToolArg


@Retention(RUNTIME) @Target(PARAMETER) public @interface ToolArg
Annotates a parameter of a Tool method. Forked from: https://github.com/quarkiverse/quarkus-mcp-server/blob/main/core/runtime/src/main/java/io/quarkiverse/mcp/server/ToolArg.java
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The description of the tool argument.
    The name of the tool argument.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant value for name() indicating that the annotated element's name should be used as-is.
  • Field Details

    • ELEMENT_NAME

      static final String ELEMENT_NAME
      Constant value for name() indicating that the annotated element's name should be used as-is.
      See Also:
  • Element Details

    • name

      String name
      The name of the tool argument. If not specified, the parameter name will be used.
      Returns:
      the name of the argument
      Default:
      "<<element name>>"
    • description

      String description
      The description of the tool argument. This description will be included in the JSON schema for the tool, providing documentation for users of the MCP tool.
      Returns:
      the description of the argument, or empty string if not specified
      Default:
      ""