Loading...
Searching...
No Matches
BinaryNinja::MCP::List< Item > Class Template Reference

A parameter for ToolBuilder::Param, or an item kind for another List, that accepts a JSON array. More...

Detailed Description

template<ParamKind Item>
class BinaryNinja::MCP::List< Item >

A parameter for ToolBuilder::Param, or an item kind for another List, that accepts a JSON array.

Each item is converted as Item would convert a lone argument, such as for List<String>. Pass the item explicitly for a kind that needs settings, such as a Choice, and name it after the list so that its errors name the parameter.

Public Member Functions

 List (std::string name, std::string description)
 List (std::string name, std::string description, Item item)
const std::string * GetRelativeTo () const
rapidjson::Value Schema (detail::Allocator &allocator) const
rapidjson::Value DefaultJson (const typename Base::Value &value, detail::Allocator &allocator) const
std::string MissingMessage () const
ArgumentResult< typename Base::Value > Convert (ToolCall &call, const rapidjson::Value &value, const ConvertedArguments &converted) const
Public Member Functions inherited from BinaryNinja::MCP::ValueParam< List< Item >, std::vector< Item::Value > >
OptionalParam< List< Item > > Optional () const
DefaultParam< List< Item > > Default (std::vector< Item::Value > value) const
Public Member Functions inherited from BinaryNinja::MCP::Param< List< Item >, std::vector< Item::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< List< Item >, std::vector< Item::Value > >
using Value
using Parsed
Protected Member Functions inherited from BinaryNinja::MCP::Param< List< Item >, std::vector< Item::Value > >
const List< Item > & Self () const
Protected Attributes inherited from BinaryNinja::MCP::Param< List< Item >, std::vector< Item::Value > >
std::string m_name
std::string m_description

Constructor & Destructor Documentation

◆ List() [1/2]

template<ParamKind Item>
BinaryNinja::MCP::List< Item >::List ( std::string name,
std::string description )
inline

◆ List() [2/2]

template<ParamKind Item>
BinaryNinja::MCP::List< Item >::List ( std::string name,
std::string description,
Item item )
inline

Member Function Documentation

◆ GetRelativeTo()

template<ParamKind Item>
const std::string * BinaryNinja::MCP::List< Item >::GetRelativeTo ( ) const
inline

◆ Schema()

template<ParamKind Item>
rapidjson::Value BinaryNinja::MCP::List< Item >::Schema ( detail::Allocator & allocator) const
inline

◆ DefaultJson()

template<ParamKind Item>
rapidjson::Value BinaryNinja::MCP::List< Item >::DefaultJson ( const typename Base::Value & value,
detail::Allocator & allocator ) const
inline

◆ MissingMessage()

template<ParamKind Item>
std::string BinaryNinja::MCP::List< Item >::MissingMessage ( ) const
inline

◆ Convert()

template<ParamKind Item>
ArgumentResult< typename Base::Value > BinaryNinja::MCP::List< Item >::Convert ( ToolCall & call,
const rapidjson::Value & value,
const ConvertedArguments & converted ) const
inline