pub struct InitializeResult {
    pub capabilities: ServerCapabilities,
    pub instructions: Option<String>,
    pub meta: Option<Map<String, Value>>,
    pub protocol_version: String,
    pub server_info: Implementation,
}Expand description
After receiving an initialize request from the client, the server sends this response.
JSON schema
{
 "description": "After receiving an initialize request from the client, the server sends this response.",
 "type": "object",
 "required": [
   "capabilities",
   "protocolVersion",
   "serverInfo"
 ],
 "properties": {
   "_meta": {
     "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
     "type": "object",
     "additionalProperties": {}
   },
   "capabilities": {
     "$ref": "#/definitions/ServerCapabilities"
   },
   "instructions": {
     "description": "Instructions describing how to use the server and its features.\n\nThis can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a \"hint\" to the model. For example, this information MAY be added to the system prompt.",
     "type": "string"
   },
   "protocolVersion": {
     "description": "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.",
     "type": "string"
   },
   "serverInfo": {
     "$ref": "#/definitions/Implementation"
   }
 }
}Fields§
§capabilities: ServerCapabilities§instructions: Option<String>Instructions describing how to use the server and its features. This can be used by clients to improve the LLM’s understanding of available tools, resources, etc. It can be thought of like a “hint” to the model. For example, this information MAY be added to the system prompt.
meta: Option<Map<String, Value>>This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
protocol_version: StringThe 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.
server_info: ImplementationTrait Implementations§
Source§impl Clone for InitializeResult
 
impl Clone for InitializeResult
Source§fn clone(&self) -> InitializeResult
 
fn clone(&self) -> InitializeResult
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for InitializeResult
 
impl Debug for InitializeResult
Source§impl<'de> Deserialize<'de> for InitializeResult
 
impl<'de> Deserialize<'de> for InitializeResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<InitializeResult> for MessageFromServer
 
impl From<InitializeResult> for MessageFromServer
Source§fn from(value: InitializeResult) -> Self
 
fn from(value: InitializeResult) -> Self
Converts to this type from the input type.
Source§impl From<InitializeResult> for ResultFromServer
 
impl From<InitializeResult> for ResultFromServer
Source§fn from(value: InitializeResult) -> Self
 
fn from(value: InitializeResult) -> Self
Converts to this type from the input type.
Source§impl From<InitializeResult> for ServerResult
 
impl From<InitializeResult> for ServerResult
Source§fn from(value: InitializeResult) -> Self
 
fn from(value: InitializeResult) -> Self
Converts to this type from the input type.
Source§impl FromMessage<InitializeResult> for ServerMessage
 
impl FromMessage<InitializeResult> for ServerMessage
fn from_message( message: InitializeResult, request_id: Option<RequestId>, ) -> Result<Self, JsonrpcErrorError>
Source§impl Serialize for InitializeResult
 
impl Serialize for InitializeResult
Source§impl ToMessage<ServerMessage> for InitializeResult
 
impl ToMessage<ServerMessage> for InitializeResult
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ServerMessage, JsonrpcErrorError>
Source§impl TryFrom<ResultFromServer> for InitializeResult
 
impl TryFrom<ResultFromServer> for InitializeResult
Source§type Error = JsonrpcErrorError
 
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for InitializeResult
impl RefUnwindSafe for InitializeResult
impl Send for InitializeResult
impl Sync for InitializeResult
impl Unpin for InitializeResult
impl UnwindSafe for InitializeResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more