File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
mcp-server/src/main/kotlin Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ import kotlinx.io.asSink
11
11
import kotlinx.io.buffered
12
12
import kotlinx.serialization.json.JsonObject
13
13
import kotlinx.serialization.json.JsonPrimitive
14
+ import kotlinx.serialization.json.buildJsonObject
14
15
import kotlinx.serialization.json.jsonPrimitive
16
+ import kotlinx.serialization.json.putJsonObject
15
17
16
18
17
19
private val koin = initKoin(enableNetworkLogs = true ).koin
@@ -47,12 +49,10 @@ fun configureServer(): Server {
47
49
name = " get-emissions" ,
48
50
description = " List emission info for a particular country" ,
49
51
inputSchema = Tool .Input (
50
- properties = JsonObject (
51
- mapOf (
52
- " countryCode" to JsonPrimitive (" string" ),
53
- " year" to JsonPrimitive (" date" ),
54
- )
55
- ),
52
+ properties = buildJsonObject {
53
+ putJsonObject(" countryCode" ) { put(" type" , JsonPrimitive (" string" )) }
54
+ putJsonObject(" year" ) { put(" type" , JsonPrimitive (" string" )) }
55
+ },
56
56
required = listOf (" countryCode" , " year" )
57
57
)
58
58
You can’t perform that action at this time.
0 commit comments