Skip to content

Commit 804fe96

Browse files
authored
Merge pull request #142 from joreilly/cleanup
cleanup
2 parents c2968c3 + 68dac66 commit 804fe96

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

mcp-server/src/main/kotlin/server.kt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ fun configureServer(): Server {
2828

2929
val server = Server(
3030
Implementation(
31-
name = "mcp-kotlin PeopleInSpace server",
31+
name = "ClimateTrace MCP Server",
3232
version = "1.0.0"
3333
),
3434
ServerOptions(
3535
capabilities = ServerCapabilities(
36-
prompts = ServerCapabilities.Prompts(listChanged = true),
37-
resources = ServerCapabilities.Resources(subscribe = true, listChanged = true),
3836
tools = ServerCapabilities.Tools(listChanged = true)
3937
)
4038
)
@@ -60,10 +58,9 @@ fun configureServer(): Server {
6058
mapOf(
6159
"countryCode" to JsonPrimitive("string"),
6260
"year" to JsonPrimitive("date"),
63-
6461
)
6562
),
66-
required = listOf("countryCode")
63+
required = listOf("countryCode", "year")
6764
)
6865

6966
) { request ->
@@ -76,12 +73,11 @@ fun configureServer(): Server {
7673
}
7774

7875
val countryEmissionInfo = climateTraceRepository.fetchCountryEmissionsInfo(
79-
countryCode.jsonPrimitive.content,
80-
year.jsonPrimitive.content
76+
countryCode = countryCode.jsonPrimitive.content,
77+
year = year.jsonPrimitive.content
8178
)
8279
CallToolResult(
83-
content =
84-
countryEmissionInfo.map { TextContent(it.emissions.co2.toString()) }
80+
content = countryEmissionInfo.map { TextContent(it.emissions.co2.toString()) }
8581
)
8682
}
8783

0 commit comments

Comments
 (0)