McpResponse.error constructor
Create an error response
Implementation
factory McpResponse.error(Object id, int code, String message, {String? data}) {
return McpResponse(
id: id,
error: McpError(code: code, message: message, data: data),
);
}