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
1111import kotlinx.io.buffered
1212import kotlinx.serialization.json.JsonObject
1313import kotlinx.serialization.json.JsonPrimitive
14+ import kotlinx.serialization.json.buildJsonObject
1415import kotlinx.serialization.json.jsonPrimitive
16+ import kotlinx.serialization.json.putJsonObject
1517
1618
1719private val koin = initKoin(enableNetworkLogs = true ).koin
@@ -47,12 +49,10 @@ fun configureServer(): Server {
4749 name = " get-emissions" ,
4850 description = " List emission info for a particular country" ,
4951 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+ },
5656 required = listOf (" countryCode" , " year" )
5757 )
5858
You can’t perform that action at this time.
0 commit comments