Loading...
Searching...
No Matches
BinaryNinja::MCP::JsonValue Class Reference

A parameter for ToolBuilder::Param that accepts any JSON value matching a caller-supplied schema fragment, which carries its own description. More...

Detailed Description

A parameter for ToolBuilder::Param that accepts any JSON value matching a caller-supplied schema fragment, which carries its own description.

It cannot be an item kind for List. The handler receives the raw value, or null when an optional argument is absent or null.

Public Member Functions

 JsonValue (std::string name, std::string schema)
JsonValue Optional () const
bool IsRequired () const
void AddSchema (rapidjson::Value &properties, detail::Allocator &allocator) const
ArgumentResult< const rapidjson::Value * > Absent () const
std::string MissingMessage () const
ArgumentResult< const rapidjson::Value * > Convert (ToolCall &call, const rapidjson::Value &value, const ConvertedArguments &converted) const
Public Member Functions inherited from BinaryNinja::MCP::Param< JsonValue, const rapidjson::Value * >
 Param (std::string name, std::string description)
const std::string & GetName () const
bool IsRequired () const
const std::string * GetRelativeTo () const
 The earlier parameter this one is evaluated relative to, if any.
void AddSchema (rapidjson::Value &properties, detail::Allocator &allocator) const
ArgumentResult< Value > Absent () const

Additional Inherited Members

Public Types inherited from BinaryNinja::MCP::Param< JsonValue, const rapidjson::Value * >
using Value
using Parsed
Protected Member Functions inherited from BinaryNinja::MCP::Param< JsonValue, const rapidjson::Value * >
const JsonValue & Self () const
Protected Attributes inherited from BinaryNinja::MCP::Param< JsonValue, const rapidjson::Value * >
std::string m_name
std::string m_description

Constructor & Destructor Documentation

◆ JsonValue()

JsonValue::JsonValue ( std::string name,
std::string schema )

Member Function Documentation

◆ Optional()

JsonValue JsonValue::Optional ( ) const

◆ IsRequired()

bool BinaryNinja::MCP::JsonValue::IsRequired ( ) const
inline

◆ AddSchema()

void JsonValue::AddSchema ( rapidjson::Value & properties,
detail::Allocator & allocator ) const

◆ Absent()

ArgumentResult< const rapidjson::Value * > JsonValue::Absent ( ) const

◆ MissingMessage()

std::string JsonValue::MissingMessage ( ) const

◆ Convert()

ArgumentResult< const rapidjson::Value * > JsonValue::Convert ( ToolCall & call,
const rapidjson::Value & value,
const ConvertedArguments & converted ) const