LLDB mainline
lldb_protocol::mcp::CallToolResult Struct Reference

The server’s response to a tool call. More...

#include <Protocol.h>

Public Attributes

std::vector< ContentBlockcontent
 A list of content objects that represent the unstructured result of the tool call.
bool isError = false
 Whether the tool call ended in an error.
std::optional< llvm::json::Value > structuredContent = std::nullopt
 An optional JSON object that represents the structured result of the tool call.

Detailed Description

The server’s response to a tool call.

Definition at line 299 of file Protocol.h.

Member Data Documentation

◆ content

std::vector<ContentBlock> lldb_protocol::mcp::CallToolResult::content

A list of content objects that represent the unstructured result of the tool call.

Definition at line 302 of file Protocol.h.

Referenced by lldb_protocol::mcp::fromJSON(), and lldb_protocol::mcp::toJSON().

◆ isError

bool lldb_protocol::mcp::CallToolResult::isError = false

Whether the tool call ended in an error.

If not set, this is assumed to be false (the call was successful).

Any errors that originate from the tool SHOULD be reported inside the result object, with isError set to true, not as an MCP protocol-level error response. Otherwise, the LLM would not be able to see that an error occurred and self-correct.

However, any errors in finding the tool, an error indicating that the server does not support tool calls, or any other exceptional conditions, should be reported as an MCP error response.

Definition at line 316 of file Protocol.h.

Referenced by lldb_protocol::mcp::fromJSON(), and lldb_protocol::mcp::toJSON().

◆ structuredContent

std::optional<llvm::json::Value> lldb_protocol::mcp::CallToolResult::structuredContent = std::nullopt

An optional JSON object that represents the structured result of the tool call.

Definition at line 320 of file Protocol.h.

Referenced by lldb_protocol::mcp::fromJSON(), and lldb_protocol::mcp::toJSON().


The documentation for this struct was generated from the following file: