Annotation Interface McpJsonSchemaProperty


@Target(FIELD) @Retention(RUNTIME) public @interface McpJsonSchemaProperty
This annotation is used to define the property of a complex JSON schema type (such as custom Java data classes) for an MCP (Model Context Protocol) server.

By using this annotation, you can define custom JSON schema properties that are not natively supported by the MCP protocol. This allows you to use more complex data models in your MCP server.

作者:
codeboyzhou
另请参阅:
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    The description of the JSON schema property.
    The name of the JSON schema property.
    boolean
    Whether the JSON schema property is required.
  • 元素详细资料

    • name

      String name
      The name of the JSON schema property. If not specified, the field name will be used.
      返回:
      the name of the JSON schema property
      默认值:
      ""
    • description

      String description
      The description of the JSON schema property. If not specified, the default value "Not specified" will be used.
      返回:
      the description of the JSON schema property
      默认值:
      ""
    • required

      boolean required
      Whether the JSON schema property is required. If not specified, the default value false will be used.
      返回:
      whether the JSON schema property is required
      默认值:
      false