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
14
#include <
entropic/mcp/tool_base.h
>
15
16
#include <string>
17
#include <unordered_map>
18
#include <vector>
19
20
namespace
entropic
{
21
31
class
ToolRegistry
{
32
public
:
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
80
private
:
81
std::unordered_map<std::string, ToolBase*> tools_;
82
};
83
84
}
// namespace entropic
entropic::ToolBase
Abstract base class for individual MCP tools.
Definition
tool_base.h:45
entropic::ToolRegistry
Manages a collection of ToolBase instances.
Definition
tool_registry.h:31
entropic::ToolRegistry::register_tool
void register_tool(ToolBase *tool)
Register a tool instance.
Definition
tool_registry.cpp:24
entropic::ToolRegistry::dispatch
ServerResponse dispatch(const std::string &name, const std::string &args_json)
Dispatch a tool call to the registered tool's execute().
Definition
tool_registry.cpp:90
entropic::ToolRegistry::get_tools_json
std::string get_tools_json() const
Get all registered tool definitions as a JSON array string.
Definition
tool_registry.cpp:54
entropic::ToolRegistry::has_tool
bool has_tool(const std::string &name) const
Check if a tool is registered by name.
Definition
tool_registry.cpp:44
entropic::ToolRegistry::get_tool
ToolBase * get_tool(const std::string &name) const
Get a registered tool by name.
Definition
tool_registry.cpp:111
entropic::ToolRegistry::get_definitions
std::vector< const ToolDefinition * > get_definitions() const
Get all registered tool definitions.
Definition
tool_registry.cpp:73
entropic
Activate model on GPU (WARM → ACTIVE).
Definition
bundled_models.h:20
entropic::ServerResponse
Structured result from tool execution.
Definition
server_base.h:33
tool_base.h
Abstract base class for individual MCP tools.
entropic
mcp
tool_registry.h
Generated by
1.9.8