Skip to content

Commit 0d8253e

Browse files
committed
refactors the serverInfo and instructions to protected
1 parent 574c435 commit 0d8253e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

kotlin-sdk-server/api/kotlin-sdk-server.api

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ public class io/modelcontextprotocol/kotlin/sdk/server/Server : io/modelcontextp
6767
public static synthetic fun createMessage$default (Lio/modelcontextprotocol/kotlin/sdk/server/Server;Lio/modelcontextprotocol/kotlin/sdk/CreateMessageRequest;Lio/modelcontextprotocol/kotlin/sdk/shared/RequestOptions;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
6868
public final fun getClientCapabilities ()Lio/modelcontextprotocol/kotlin/sdk/ClientCapabilities;
6969
public final fun getClientVersion ()Lio/modelcontextprotocol/kotlin/sdk/Implementation;
70+
protected final fun getInstructions ()Ljava/lang/String;
7071
public final fun getPrompts ()Ljava/util/Map;
7172
public final fun getResources ()Ljava/util/Map;
73+
protected final fun getServerInfo ()Lio/modelcontextprotocol/kotlin/sdk/Implementation;
7274
public final fun getTools ()Ljava/util/Map;
7375
public final fun listRoots (Lkotlinx/serialization/json/JsonObject;Lio/modelcontextprotocol/kotlin/sdk/shared/RequestOptions;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
7476
public static synthetic fun listRoots$default (Lio/modelcontextprotocol/kotlin/sdk/server/Server;Lkotlinx/serialization/json/JsonObject;Lio/modelcontextprotocol/kotlin/sdk/shared/RequestOptions;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;

kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/Server.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ public class ServerOptions(public val capabilities: ServerCapabilities, enforceS
7979
* @param instructions Optional instructions from the server to the client about how to use this server.
8080
*/
8181
public open class Server(
82-
private val serverInfo: Implementation,
82+
protected val serverInfo: Implementation,
8383
options: ServerOptions,
84-
private val instructions: String? = null,
84+
protected val instructions: String? = null,
8585
) : Protocol(options) {
8686
@Suppress("ktlint:standard:backing-property-naming")
8787
private var _onInitialized: (() -> Unit) = {}

0 commit comments

Comments
 (0)