Skip to content

Commit ae24916

Browse files
committed
fixed RequestSerializerTest
1 parent 30a2b60 commit ae24916

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types.kt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,23 +1269,22 @@ public data class Tool(
12691269
public var inputSchema: Input = Input()
12701270
public var outputSchema: Output? = null
12711271
public var annotations: ToolAnnotations? = null
1272+
12721273
@Suppress("PropertyName")
12731274
public var _meta: JsonObject = EmptyJsonObject
12741275

1275-
public fun build(): Tool {
1276-
return Tool(
1277-
name = requireNotNull(name){ "Tool name is required" },
1278-
title = title,
1279-
description = description,
1280-
inputSchema = inputSchema,
1281-
outputSchema = outputSchema,
1282-
annotations = annotations,
1283-
_meta = _meta,
1284-
)
1285-
}
1276+
public fun build(): Tool = Tool(
1277+
name = requireNotNull(name) { "Tool name is required" },
1278+
title = title,
1279+
description = description,
1280+
inputSchema = inputSchema,
1281+
outputSchema = outputSchema,
1282+
annotations = annotations,
1283+
_meta = _meta,
1284+
)
12861285
}
12871286

1288-
public companion object{
1287+
public companion object {
12891288
public fun build(builder: Builder.() -> Unit): Tool = Builder().apply(builder).build()
12901289
}
12911290
}

kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/RequestSerializerTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ class RequestSerializerTest {
7575
"inputSchema": {
7676
"type": "object",
7777
"properties": {}
78-
}
78+
},
79+
"_meta": {}
7980
}
8081
]
8182
}"""

0 commit comments

Comments
 (0)