Annotation Interface McpI18nEnabled
This annotation is used to mark a class as i18n enabled.
When the main class of MCP (Model Context Protocol) server application is annotated with
@McpI18nEnabled, it indicates that the server application supports internationalization
(i18n) for tool/prompt/resource methods. This allows for the translation of tool/prompt/resource
titles and descriptions into different languages.
Note: This annotation is only applicable to the main class of the MCP server application.
Example usage:
@McpI18nEnabled(resourceBundleBaseName = "mcp_server_component_i18n")
public class MyMcpServerApplication {
// Application logic...
}
- Author:
- codeboyzhou
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionSpecifies the base name of the resource bundle to be used for i18n.
-
Element Details
-
resourceBundleBaseName
String resourceBundleBaseNameSpecifies the base name of the resource bundle to be used for i18n.The resource bundle base name should follow the standard Java resource bundle naming convention. For example, if the resource bundle base name is "messages", the corresponding resource bundle files should be named "messages.properties", "messages_en_US.properties", "messages_zh_CN.properties", etc.
- Returns:
- the base name of the resource bundle
-