Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
tool_registry.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
12#pragma once
13
15
16#include <string>
17#include <unordered_map>
18#include <vector>
19
20namespace entropic {
21
32public:
38 void register_tool(ToolBase* tool);
39
46 bool has_tool(const std::string& name) const;
47
53 std::string get_tools_json() const;
54
60 std::vector<const ToolDefinition*> get_definitions() const;
61
69 ServerResponse dispatch(const std::string& name,
70 const std::string& args_json);
71
78 ToolBase* get_tool(const std::string& name) const;
79
80private:
81 std::unordered_map<std::string, ToolBase*> tools_;
82};
83
84} // namespace entropic
Abstract base class for individual MCP tools.
Definition tool_base.h:45
Manages a collection of ToolBase instances.
void register_tool(ToolBase *tool)
Register a tool instance.
ServerResponse dispatch(const std::string &name, const std::string &args_json)
Dispatch a tool call to the registered tool's execute().
std::string get_tools_json() const
Get all registered tool definitions as a JSON array string.
bool has_tool(const std::string &name) const
Check if a tool is registered by name.
ToolBase * get_tool(const std::string &name) const
Get a registered tool by name.
std::vector< const ToolDefinition * > get_definitions() const
Get all registered tool definitions.
Activate model on GPU (WARM → ACTIVE).
Structured result from tool execution.
Definition server_base.h:33
Abstract base class for individual MCP tools.