1- package io.modelcontextprotocol.kotlin.sdk.server
1+ package io.modelcontextprotocol.annotation
22
3- import io.ktor.util.rootCause
4- import io.modelcontextprotocol.kotlin.sdk.CallToolRequest
53import io.modelcontextprotocol.kotlin.sdk.CallToolResult
64import io.modelcontextprotocol.kotlin.sdk.TextContent
75import io.modelcontextprotocol.kotlin.sdk.Tool
8- import kotlinx.serialization.json.JsonObject
6+ import io.modelcontextprotocol.kotlin.sdk.server.Server
97import kotlinx.serialization.json.JsonPrimitive
108import kotlinx.serialization.json.buildJsonObject
119import kotlinx.serialization.json.put
1210import kotlinx.serialization.json.putJsonObject
1311import java.lang.reflect.InvocationTargetException
14- import kotlin.reflect.KCallable
15- import kotlin.reflect.KClass
1612import kotlin.reflect.KFunction
1713import kotlin.reflect.KParameter
1814import kotlin.reflect.KType
1915import kotlin.reflect.full.findAnnotation
2016import kotlin.reflect.full.hasAnnotation
2117import kotlin.reflect.full.instanceParameter
2218import kotlin.reflect.full.valueParameters
23- import kotlin.reflect.typeOf
24- import kotlin.text.get
25- import kotlin.text.set
2619
2720/* *
28- * Extension function to register tools from class methods annotated with [McpTool].
29- * This function will scan the provided class for methods annotated with [McpTool] and register them as tools.
21+ * Extension function to register tools from class methods annotated with [io.modelcontextprotocooool. McpTool].
22+ * This function will scan the provided class for methods annotated with [io.modelcontextprotocooool. McpTool] and register them as tools.
3023 *
3124 * @param instance The instance of the class containing the annotated methods.
3225 * @param T The type of the class.
@@ -50,7 +43,7 @@ public inline fun <reified T : Any> Server.registerAnnotatedTools(instance: T) {
5043 *
5144 * @param instance The instance of the class containing the annotated method.
5245 * @param function The function to register as a tool.
53- * @param annotation The [McpTool] annotation.
46+ * @param annotation The [io.modelcontextprotocooool. McpTool] annotation.
5447 */
5548public fun <T : Any > Server.registerToolFromAnnotatedFunction (
5649 instance : T ,
0 commit comments