pub struct MethodNotFoundError {
pub code: i64,
pub data: Option<Value>,
pub message: String,
}Expand description
Latest MCP Protocol 2026_07_28 A JSON-RPC error indicating that the requested method does not exist or is not available. In MCP, a server returns this error when a client invokes a method the server does not implement — either a genuinely unknown method, or one gated behind a server capability the server did not advertise (e.g., calling prompts/list when the prompts capability was not advertised). A request that requires a client capability the client did not declare is signalled instead by {@link MissingRequiredClientCapabilityError} (-32021).
JSON schema
{
"description": "A JSON-RPC error indicating that the requested method does not exist or is not available.\n\nIn MCP, a server returns this error when a client invokes a method the server does not implement — either a genuinely unknown method, or one gated behind a server capability the server did not advertise (e.g., calling prompts/list when the prompts capability was not advertised).\n\nA request that requires a client capability the client did not declare is signalled instead by {@link MissingRequiredClientCapabilityError} (-32021).",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"description": "The error type that occurred.",
"type": "integer",
"const": -32601
},
"data": {
"description": "Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.)."
},
"message": {
"description": "A short description of the error. The message SHOULD be limited to a concise single sentence.",
"type": "string"
}
}
}Fields§
§code: i64The error type that occurred.
data: Option<Value>Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
message: StringA short description of the error. The message SHOULD be limited to a concise single sentence.
Trait Implementations§
Source§impl Clone for MethodNotFoundError
impl Clone for MethodNotFoundError
Source§fn clone(&self) -> MethodNotFoundError
fn clone(&self) -> MethodNotFoundError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more