Boost C++ Libraries

PrevUpHomeNext

Struct mcp_arg

boost::taar::mcp::mcp_arg — Argument provider reading one member of params.arguments in a tools/call.

Synopsis

// In header: <boost/taar/mcp/arg.hpp>


struct mcp_arg {

  // public member functions
  explicit mcp_arg(std::string, std::string = {});
  std::string const & name() const noexcept;
  std::string const & description() const noexcept;
  taar::result< boost::json::value > 
  operator()(tool_call const &, matcher::context const &) const;
};

Description

Converted to the callable's parameter type through rest_arg_cast. The description feeds the tool's inputSchema.

mcp_arg public member functions

  1. explicit mcp_arg(std::string name, std::string description = {});
  2. std::string const & name() const noexcept;
  3. std::string const & description() const noexcept;
  4. taar::result< boost::json::value > 
    operator()(tool_call const & c, matcher::context const &) const;

PrevUpHomeNext