@@ -28,13 +28,11 @@ fun configureServer(): Server {
28
28
29
29
val server = Server (
30
30
Implementation (
31
- name = " mcp-kotlin PeopleInSpace server " ,
31
+ name = " ClimateTrace MCP Server " ,
32
32
version = " 1.0.0"
33
33
),
34
34
ServerOptions (
35
35
capabilities = ServerCapabilities (
36
- prompts = ServerCapabilities .Prompts (listChanged = true ),
37
- resources = ServerCapabilities .Resources (subscribe = true , listChanged = true ),
38
36
tools = ServerCapabilities .Tools (listChanged = true )
39
37
)
40
38
)
@@ -60,10 +58,9 @@ fun configureServer(): Server {
60
58
mapOf (
61
59
" countryCode" to JsonPrimitive (" string" ),
62
60
" year" to JsonPrimitive (" date" ),
63
-
64
61
)
65
62
),
66
- required = listOf (" countryCode" )
63
+ required = listOf (" countryCode" , " year " )
67
64
)
68
65
69
66
) { request ->
@@ -76,12 +73,11 @@ fun configureServer(): Server {
76
73
}
77
74
78
75
val countryEmissionInfo = climateTraceRepository.fetchCountryEmissionsInfo(
79
- countryCode.jsonPrimitive.content,
80
- year.jsonPrimitive.content
76
+ countryCode = countryCode .jsonPrimitive.content,
77
+ year = year .jsonPrimitive.content
81
78
)
82
79
CallToolResult (
83
- content =
84
- countryEmissionInfo.map { TextContent (it.emissions.co2.toString()) }
80
+ content = countryEmissionInfo.map { TextContent (it.emissions.co2.toString()) }
85
81
)
86
82
}
87
83
0 commit comments