Annotation Interface Prompt


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface Prompt
Method annotation to define an MCP Prompt. Prompts Micronaut registers Prompts singletons for beans with executable methods (e.g. methods in a class annotated with `@Singleton`) annotated with Prompt. Forked from: https://github.com/quarkiverse/quarkus-mcp-server/blob/main/core/runtime/src/main/java/io/quarkiverse/mcp/server/Prompt.java
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
     
  • 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
      Returns:
      Each prompt must have a unique name. By default, the name is derived from the name of the annotated method.
      Default:
      "<<element name>>"
    • description

      String description
      Returns:
      An optional description.
      Default:
      ""