namespace ModelContextProtocol; /// /// Represents standard JSON-RPC error codes as defined in the MCP specification. /// public enum McpErrorCode { /// /// Indicates that the JSON received could not be parsed. /// /// /// This error occurs when the input contains malformed JSON or incorrect syntax. /// ParseError = -32700, /// /// Indicates that the JSON payload does not conform to the expected Request object structure. /// /// /// The request is considered invalid if it lacks required fields or fails to follow the JSON-RPC protocol. /// InvalidRequest = -32600, /// /// Indicates that the requested method does not exist or is not available on the server. /// /// /// This error is returned when the method name specified in the request cannot be found. /// MethodNotFound = -32601, /// /// Indicates that one or more parameters provided in the request are invalid. /// /// /// This error is returned when the parameters do not match the expected method signature or constraints. /// This includes cases where required parameters are missing or not understood, such as when a name for /// a tool or prompt is not recognized. /// InvalidParams = -32602, /// /// Indicates that an internal error occurred while processing the request. /// /// /// This error is used when the endpoint encounters an unexpected condition that prevents it from fulfilling the request. /// InternalError = -32603, }