InitializeResult

data class InitializeResult(val protocolVersion: String = LATEST_PROTOCOL_VERSION, val capabilities: ServerCapabilities, val serverInfo: Implementation, val instructions: String? = null, val meta: JsonObject? = null) : ServerResult(source)

After receiving an InitializeRequest from the client, the server sends this response.

The server communicates its chosen protocol version, capabilities, and optional instructions for how to effectively use its features.

Constructors

Link copied to clipboard
constructor(protocolVersion: String = LATEST_PROTOCOL_VERSION, capabilities: ServerCapabilities, serverInfo: Implementation, instructions: String? = null, meta: JsonObject? = null)

Properties

Link copied to clipboard
open val _meta: JsonObject
Link copied to clipboard

The capabilities that this server supports. Describes which optional features the server has implemented.

Link copied to clipboard

Optional instructions describing how to use the server and its features. Clients can use this to improve the LLM's understanding of available tools, resources, etc. It can be thought of as a "hint" to the model. For example, this information MAY be added to the system prompt to help the LLM make better use of the server's capabilities.

Link copied to clipboard
@SerialName(value = "_meta")
open override val meta: JsonObject?

Optional metadata for this response.

Link copied to clipboard

The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.

Link copied to clipboard

Information about the server implementation, including name, version, and branding.