Annotation 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.
- Author:
- codeboyzhou
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe description of the JSON schema property.The name of the JSON schema property.booleanWhether the JSON schema property is required.
-
Element Details
-
name
String nameThe name of the JSON schema property. Defaults to the Java field name.- Returns:
- the name of the JSON schema property
- Default:
- ""
-
description
String descriptionThe description of the JSON schema property. Defaults to the value of thenameattribute.- Returns:
- the description of the JSON schema property
- Default:
- ""
-
required
boolean requiredWhether the JSON schema property is required. Defaults totrue.- Returns:
- whether the JSON schema property is required
- Default:
- true
-