cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
mcp::protocol::ToolResult Struct Reference

Result object for tools/call. More...

#include <tool.hpp>

Public Member Functions

bool is_error_result () const noexcept
 Convenience predicate treating a missing signal as success.
 

Static Public Member Functions

static ToolResult text (std::string value)
 Creates a successful text-only tool result.
 
static ToolResult error_text (std::string value)
 Creates an error text-only tool result.
 

Public Attributes

std::vector< ContentBlockcontent
 Ordered user/model-visible content returned by the tool.
 
std::optional< Jsonstructured_content
 Optional machine-readable result matching the tool output schema.
 
std::optional< bool > is_error
 Optional domain-level error signal.
 
std::optional< Jsonmeta
 Optional _meta extension object preserved on the wire.
 
std::optional< std::string > result_type
 Result type discriminator.
 
std::optional< Jsoninput_requests
 Server input requests for MRTR (SEP-2322).
 
std::optional< std::string > request_state
 Opaque request state for MRTR retries (SEP-2322).
 
Json extensions = Json::object()
 Unknown JSON members preserved for forward-compatible round trips.
 

Detailed Description

Result object for tools/call.

Member Data Documentation

◆ is_error

std::optional<bool> mcp::protocol::ToolResult::is_error

Optional domain-level error signal.

Missing means the peer did not state whether the tool call produced an error; explicit false is preserved.

◆ result_type

std::optional<std::string> mcp::protocol::ToolResult::result_type

Result type discriminator.

"input_required" for MRTR (SEP-2322). Missing means the result is complete.


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