Agent / foldkit-agent-mcp

jsonRpcCode

namespace · packages/agent-mcp/src/jsonRpc.ts:41

const jsonRpcCode = {
  PARSE_ERROR,
  INVALID_REQUEST,
  METHOD_NOT_FOUND,
  INVALID_PARAMS,
  INTERNAL_ERROR,
  REQUEST_FAILED,
}

The codes MCP relies on.

INVALID_PARAMS is the one that carries meaning here: the spec puts an unknown tool and arguments that fail the advertised schema on this side, and everything the application decided -- unavailable, unauthorized, cancelled -- in a result with isError.

Members

jsonRpcCode.PARSE_ERROR

const · packages/agent-mcp/src/jsonRpc.ts:42

PARSE_ERROR: -32700

jsonRpcCode.INVALID_REQUEST

const · packages/agent-mcp/src/jsonRpc.ts:43

INVALID_REQUEST: -32600

jsonRpcCode.METHOD_NOT_FOUND

const · packages/agent-mcp/src/jsonRpc.ts:44

METHOD_NOT_FOUND: -32601

jsonRpcCode.INVALID_PARAMS

const · packages/agent-mcp/src/jsonRpc.ts:45

INVALID_PARAMS: -32602

jsonRpcCode.INTERNAL_ERROR

const · packages/agent-mcp/src/jsonRpc.ts:46

INTERNAL_ERROR: -32603

jsonRpcCode.REQUEST_FAILED

const · packages/agent-mcp/src/jsonRpc.ts:48

REQUEST_FAILED: -32002

Used by MCP for "not initialized" and "resource not found".