@@ -6,12 +6,29 @@ namespace ModelContextProtocol;
66public enum McpErrorCode
77{
88 /// <summary>
9- /// Indicates that the JSON received could not be parsed .
9+ /// Indicates that the requested resource could not be found .
1010 /// </summary>
1111 /// <remarks>
12- /// This error occurs when the input contains malformed JSON or incorrect syntax.
12+ /// This error should be used when a resource URI does not match any available resource on the server.
13+ /// It allows clients to distinguish between missing resources and other types of errors.
1314 /// </remarks>
14- ParseError = - 32700 ,
15+ ResourceNotFound = - 32002 ,
16+
17+ /// <summary>
18+ /// Indicates that URL-mode elicitation is required to complete the requested operation.
19+ /// </summary>
20+ /// <remarks>
21+ /// <para>
22+ /// This error is returned when a server operation requires additional user input through URL-mode elicitation
23+ /// before it can proceed. The error data must include the `data.elicitations` payload describing the pending
24+ /// elicitation(s) for the client to present to the user.
25+ /// </para>
26+ /// <para>
27+ /// Common scenarios include OAuth authorization and other out-of-band flows that cannot be completed inside
28+ /// the MCP client.
29+ /// </para>
30+ /// </remarks>
31+ UrlElicitationRequired = - 32042 ,
1532
1633 /// <summary>
1734 /// Indicates that the JSON payload does not conform to the expected Request object structure.
@@ -58,27 +75,10 @@ public enum McpErrorCode
5875 InternalError = - 32603 ,
5976
6077 /// <summary>
61- /// Indicates that URL-mode elicitation is required to complete the requested operation.
62- /// </summary>
63- /// <remarks>
64- /// <para>
65- /// This error is returned when a server operation requires additional user input through URL-mode elicitation
66- /// before it can proceed. The error data must include the `data.elicitations` payload describing the pending
67- /// elicitation(s) for the client to present to the user.
68- /// </para>
69- /// <para>
70- /// Common scenarios include OAuth authorization and other out-of-band flows that cannot be completed inside
71- /// the MCP client.
72- /// </para>
73- /// </remarks>
74- UrlElicitationRequired = - 32042 ,
75-
76- /// <summary>
77- /// Indicates that the requested resource could not be found.
78+ /// Indicates that the JSON received could not be parsed.
7879 /// </summary>
7980 /// <remarks>
80- /// This error should be used when a resource URI does not match any available resource on the server.
81- /// It allows clients to distinguish between missing resources and other types of errors.
81+ /// This error occurs when the input contains malformed JSON or incorrect syntax.
8282 /// </remarks>
83- ResourceNotFound = - 32002 ,
83+ ParseError = - 32700 ,
8484}
0 commit comments