@@ -1273,16 +1273,12 @@ server.addTool(
1273
1273
Get weather alerts for a US state. Input is Two-letter US state code (e.g. CA, NY)
1274
1274
""" .trimIndent(),
1275
1275
inputSchema = Tool .Input (
1276
- properties = JsonObject (
1277
- mapOf (
1278
- " state" to JsonObject (
1279
- mapOf (
1280
- " type" to JsonPrimitive (" string" ),
1281
- " description" to JsonPrimitive (" Two-letter US state code (e.g. CA, NY)" )
1282
- )
1283
- ),
1284
- )
1285
- ),
1276
+ properties = buildJsonObject {
1277
+ putJsonObject(" state" ) {
1278
+ put(" type" , " string" )
1279
+ put(" description" , " Two-letter US state code (e.g. CA, NY)" )
1280
+ }
1281
+ },
1286
1282
required = listOf (" state" )
1287
1283
)
1288
1284
) { request ->
@@ -1305,12 +1301,10 @@ server.addTool(
1305
1301
Get weather forecast for a specific latitude/longitude
1306
1302
""" .trimIndent(),
1307
1303
inputSchema = Tool .Input (
1308
- properties = JsonObject (
1309
- mapOf (
1310
- " latitude" to JsonObject (mapOf (" type" to JsonPrimitive (" number" ))),
1311
- " longitude" to JsonObject (mapOf (" type" to JsonPrimitive (" number" ))),
1312
- )
1313
- ),
1304
+ properties = buildJsonObject {
1305
+ putJsonObject(" latitude" ) { put(" type" , " number" ) }
1306
+ putJsonObject(" longitude" ) { put(" type" , " number" ) }
1307
+ },
1314
1308
required = listOf (" latitude" , " longitude" )
1315
1309
)
1316
1310
) { request ->
0 commit comments