52 [[nodiscard]]
const Tool*
find(std::string_view name)
const;
53 [[nodiscard]] std::size_t
size()
const {
return tools_.size(); }
54 [[nodiscard]]
bool empty()
const {
return tools_.empty(); }
56 [[nodiscard]]
const std::vector<Tool>&
tools()
const {
return tools_; }
59 [[nodiscard]] std::vector<ToolSpec>
specs()
const;
73 std::vector<Tool> tools_;
74 std::map<std::string, std::size_t, std::less<>> index_;
One JSON value: null, a boolean, a number, a string, an array or an object.
Definition json.hpp:22
A small strict JSON value, parser and deterministic writer (RFC 8259).
The orchestrator's message format, shared by every LLM provider.
std::function< ToolOutcome(const ToolCall &)> ToolExecutor
Runs one tool call. ToolRegistry::executor() provides one; any function works.
Definition tool_loop.hpp:33
std::function< ToolOutcome(const JsonValue &input)> ToolHandler
Runs a tool on an input that already matches its schema. An exception becomes an error result with th...
Definition tool_registry.hpp:22