@@ -39,10 +39,19 @@ public enum McpErrorCode
3939 InvalidRequest = - 32600 ,
4040
4141 /// <summary>
42- /// Indicates that the requested method does not exist or is not available on the server .
42+ /// Indicates that the requested method does not exist or is not available.
4343 /// </summary>
4444 /// <remarks>
45- /// This error is returned when the method name specified in the request cannot be found.
45+ /// <para>
46+ /// In MCP, this error is returned when a request is made for a method that requires a capability
47+ /// that has not been declared. This can occur in either direction:
48+ /// </para>
49+ /// <list type="bullet">
50+ /// <item><description>A server returning this error when the client requests a capability it doesn't support
51+ /// (for example, requesting completions when the <c>completions</c> capability was not advertised).</description></item>
52+ /// <item><description>A client returning this error when the server requests a capability it doesn't support
53+ /// (for example, requesting roots when the client did not declare the <c>roots</c> capability).</description></item>
54+ /// </list>
4655 /// </remarks>
4756 MethodNotFound = - 32601 ,
4857
@@ -51,15 +60,19 @@ public enum McpErrorCode
5160 /// </summary>
5261 /// <remarks>
5362 /// <para>
54- /// This error is returned for protocol-level parameter issues, such as :
63+ /// In MCP, this error is returned for protocol-level parameter validation failures in various contexts :
5564 /// </para>
5665 /// <list type="bullet">
57- /// <item><description>Malformed requests that fail to satisfy the request schema (for example, CallToolRequest)</description></item>
58- /// <item><description>Unknown or unrecognized primitive names (for example, tool, prompt, or resource names)</description></item>
59- /// <item><description>Missing required protocol-level parameters</description></item>
66+ /// <item><description><b>Tools</b>: Unknown tool name or invalid protocol-level tool arguments.</description></item>
67+ /// <item><description><b>Prompts</b>: Unknown prompt name or missing required protocol-level arguments.</description></item>
68+ /// <item><description><b>Pagination</b>: Invalid or expired cursor values.</description></item>
69+ /// <item><description><b>Logging</b>: Invalid log level.</description></item>
70+ /// <item><description><b>Tasks</b>: Invalid or nonexistent task ID or invalid cursor.</description></item>
71+ /// <item><description><b>Elicitation</b>: Server requests an elicitation mode not declared in client capabilities.</description></item>
72+ /// <item><description><b>Sampling</b>: Missing tool result or tool results mixed with other content.</description></item>
6073 /// </list>
6174 /// <para>
62- /// Note: Input validation errors within tool/prompt/resource arguments should be reported as execution errors
75+ /// Note: Application-layer validation errors within tool/prompt/resource arguments should be reported as execution errors
6376 /// (for example, via <see cref="Protocol.CallToolResult.IsError"/>) rather than as protocol errors, allowing language
6477 /// models to receive error feedback and self-correct.
6578 /// </para>
0 commit comments