Public Member Functions | |
| ToolResult ()=default | |
| An empty, successful result. | |
| ToolResult & | AddText (std::string text) |
| ToolResult & | AddWarning (std::string code, std::string message) |
| An advisory warning about the result, such as analysis that has not finished. | |
| void | ApplyTo (BNMcpToolResult *result) const |
| std::string | ToJson () const |
| Serialized as an MCP CallToolResult. | |
Static Public Member Functions | |
| static ToolResult | Text (std::string text) |
| static ToolResult | Structured (const rapidjson::Value &content) |
| When no text is added, clients that ignore structured content see it serialized as text. | |
| static ToolResult | Error (std::string code, std::string message, const rapidjson::Value *details=nullptr) |
|
default |
An empty, successful result.
|
static |
|
static |
When no text is added, clients that ignore structured content see it serialized as text.
|
static |
| ToolResult & ToolResult::AddText | ( | std::string | text | ) |
| ToolResult & ToolResult::AddWarning | ( | std::string | code, |
| std::string | message ) |
An advisory warning about the result, such as analysis that has not finished.
Clients see it in the structured content's reserved warnings member, and after any text.
| void ToolResult::ApplyTo | ( | BNMcpToolResult * | result | ) | const |
| std::string ToolResult::ToJson | ( | ) | const |
Serialized as an MCP CallToolResult.