pub fn failure(message: impl Display) -> JsonObjectExpand description
A handler’s failure, as a tools/call result.
Always an error result rather than a transport failure, because a tool that refuses is a normal answer: the call reached the tool and the tool said no. The distinction matters to a caller deciding whether to retry, and folding the two together would make every refusal look like a broken connection.