Table of Contents

Class McpServerException

Namespace
LMKit.Mcp.Server
Assembly
LM-Kit.NET.dll

A protocol-level fault that should reach the client as a JSON-RPC error.

[Obfuscation(Exclude = true)]
public sealed class McpServerException : Exception, ISerializable
Inheritance
McpServerException
Implements
Inherited Members

Remarks

Reserve this for faults the caller cannot act on: an unknown method, unusable parameters, a malformed message. A tool that fails for a reason the caller could correct returns FromError(string) instead, so the explanation is visible to the model.

Constructors

McpServerException(McpErrorCode, string)

Initializes a new instance.

McpServerException(McpErrorCode, string, Exception)

Initializes a new instance carrying an inner exception.

Properties

ErrorCode

Gets the JSON-RPC error code to report.

Share