1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * This file is part of the Nexus MCP SDK package.
7: *
8: * (c) 2026 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
9: *
10: * For the full copyright and license information, please view
11: * the LICENSE file that was distributed with this source code.
12: */
13:
14: namespace Nexus\Mcp\Core\Schema\Enum;
15:
16: /**
17: * Error codes for protocol errors that are transmitted as JSON-RPC error responses.
18: *
19: * @see https://www.jsonrpc.org/specification#error_object
20: */
21: enum ProtocolErrorCode: int
22: {
23: /**
24: * Invalid JSON was received by the server.
25: */
26: case ParseError = -32700;
27:
28: /**
29: * The JSON sent is not a valid Request object.
30: */
31: case InvalidRequest = -32600;
32:
33: /**
34: * The method does not exist or is not available.
35: */
36: case MethodNotFound = -32601;
37:
38: /**
39: * Invalid method parameter(s).
40: */
41: case InvalidParams = -32602;
42:
43: /**
44: * Internal JSON-RPC error.
45: */
46: case InternalError = -32603;
47:
48: /**
49: * Server requires the client to satisfy a URL elicitation before continuing (MCP-specific).
50: */
51: case UrlElicitationRequired = -32042;
52: }
53: