forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMcpErrorCode.cs
More file actions
49 lines (44 loc) · 1.74 KB
/
McpErrorCode.cs
File metadata and controls
49 lines (44 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
namespace ModelContextProtocol;
/// <summary>
/// Represents standard JSON-RPC error codes as defined in the MCP specification.
/// </summary>
public enum McpErrorCode
{
/// <summary>
/// Indicates that the JSON received could not be parsed.
/// </summary>
/// <remarks>
/// This error occurs when the input contains malformed JSON or incorrect syntax.
/// </remarks>
ParseError = -32700,
/// <summary>
/// Indicates that the JSON payload does not conform to the expected Request object structure.
/// </summary>
/// <remarks>
/// The request is considered invalid if it lacks required fields or fails to follow the JSON-RPC protocol.
/// </remarks>
InvalidRequest = -32600,
/// <summary>
/// Indicates that the requested method does not exist or is not available on the server.
/// </summary>
/// <remarks>
/// This error is returned when the method name specified in the request cannot be found.
/// </remarks>
MethodNotFound = -32601,
/// <summary>
/// Indicates that one or more parameters provided in the request are invalid.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
InvalidParams = -32602,
/// <summary>
/// Indicates that an internal error occurred while processing the request.
/// </summary>
/// <remarks>
/// This error is used when the endpoint encounters an unexpected condition that prevents it from fulfilling the request.
/// </remarks>
InternalError = -32603,
}