Annotation Interface McpPromptArgument


Binds a parameter of an McpPrompt method as a published prompt argument.

Prompt arguments must be declared as String or Optional<String>. Requiredness is inferred from the declared type: String is required and Optional<String> is optional. A blank name() uses the source-level Java parameter name. Explicit names provide a stable public contract across Java refactoring.

Author:
Mark Allen
  • Element Details

    • name

      The published argument name.
      Returns:
      the argument name, or an empty string to use the Java parameter name
      Default:
      ""
    • title

      The optional human-readable argument title.
      Returns:
      the title, or an empty string if none is configured
      Default:
      ""
    • description

      The optional human-readable argument description.
      Returns:
      the description, or an empty string if none is configured
      Default:
      ""