File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -480,13 +480,13 @@ class ToolSerializationTest {
480480 name : String = "get_weather",
481481 title : String? = null,
482482 outputSchema : Tool .Output ? = null,
483- @Suppress(" LocalVariableName" ) _meta : JsonObject = EmptyJsonObject ,
484- ): Tool = Tool (
485- name = name,
486- title = title,
487- description = " Get the current weather in a given location" ,
488- annotations = null ,
489- inputSchema = Tool .Input (
483+ @Suppress(" LocalVariableName" ) _meta : JsonObject ? = null ,
484+ ): Tool = Tool .build {
485+ this . name = name
486+ title?. let { this . title = it }
487+ this . description = " Get the current weather in a given location"
488+ this . annotations = null
489+ this . inputSchema = Tool .Input (
490490 properties = buildJsonObject {
491491 put(
492492 " location" ,
@@ -497,10 +497,10 @@ class ToolSerializationTest {
497497 )
498498 },
499499 required = listOf (" location" ),
500- ),
501- outputSchema = outputSchema,
502- _meta = _meta ,
503- )
500+ )
501+ outputSchema?. let { this . outputSchema = it }
502+ _meta ?. let { this . _meta = it }
503+ }
504504
505505 // endregion Private Methods
506506}
You can’t perform that action at this time.
0 commit comments