Open
Description
Is your feature request related to a problem? Please describe.
Currently, to describe tool definition and description of tools, lots of verbose is needed, can be done with kotlin idiomic way using annoatation Kotlin annoatations.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Kotlin annotation: https://kotlinlang.org/docs/annotations.html
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Instead of this:
server.addTool(
name = "get_forecast",
description = """
Get weather forecast for a specific latitude/longitude
""".trimIndent(),
inputSchema = Tool.Input(
properties = buildJsonObject {
putJsonObject("latitude") {
put("type", "number")
}
putJsonObject("longitude") {
put("type", "number")
}
},
required = listOf("latitude", "longitude")
)
)
@McpTool(
name = "get_forecast",
description = "Get weather forecast for a specific latitude/longitude",
)
fun getForecastTool(latitude: String, longitude: String) {