Henri Bergson offers a good insight into James’s view of truth in his essay, “On The Pragmatism of William James.” Here’s an excerpt:
More precisely, other doctrines make of truth something anterior to the clearly-determined act of the man who formulates it for the first time. He was the first to see it, we say, but it was waiting for him, just as America was waiting for Christopher Columbus. Something hid it from view and, so to speak, covered it up: he uncovered it. —Quite different is William James's conception. He does not deny that reality is independent, at least to a great extent, of what we say or think of it; but the truth, which can be attached only to what we affirm about reality, is, for him, created by our affirmation. We invent the truth to utilize reality, as we create mechanical devices to utilize the forces of nature. It seems to me one could sum up all that is essential in the pragmatic conception of truth in a formula such as this: while for other doctrines a new truth is a discovery, for pragmatism it is an invention.
It does not follow, of course, that the truth is arbitrary. The value of a mechanical invention lies solely in its practical usefulness. In the same way an affirmation, because it is true, should increase our mastery over things. It is no less the creation of a certain individual mind, and it was no more pre-existent to the effort of that mind than the phonograph, for example, existed before Edison. No doubt the inventor of the phonograph had to study the properties of sound, which is a reality. But his invention was superadded to that reality as a thing absolutely new, which might never have been produced had he not existed. Thus a truth, if it is to endure, should have its roots in realities; but these realities are only the ground in which that truth grows, and other flowers could just as well have grown there if the wind had brought other seeds.According to Bergson, pragmatism is a continuation of Kantianism. He writes: “The structure of our mind is therefore to a great extent our work, or at least the work of some of us. That, it seems to me, is the most important thesis of pragmatism, even though it has not been explicitly stated. It is in this way that pragmatism continues Kantianism. Kant had said that truth depends upon the general structure of the human mind. Pragmatism adds, or at least implies, that the structure of the human mind is the effect of the free initiative of a certain number of individual minds.”