82 const std::string&
name()
const;
116 std::string
execute(
const std::string& tool_name,
130 const std::string& tool_name,
143 const std::string& tool_name)
const;
193 static void inject_anchor_if_needed(
209 std::string normalize_args(
210 const std::string& tool_name,
211 const std::string&
raw)
const;
Concrete base class for MCP servers (80% logic).
std::string list_tools() const
List all registered tools as a JSON array string.
const std::string & name() const
Get the server name.
std::string name_
Server name.
virtual bool skip_duplicate_check(const std::string &tool_name) const
Check if a tool should skip duplicate detection.
void register_tool(ToolBase *tool)
Register a tool with this server.
virtual std::string get_permission_pattern(const std::string &tool_name, const std::string &args_json) const
Generate permission pattern for 'Always Allow/Deny'.
ToolRegistry registry_
Tool registry.
virtual bool set_working_dir(const std::string &path)
Set the working directory.
virtual bool configure(const std::string &config_json)
Configure the server after creation.
const ToolRegistry & registry() const
Get the tool registry (const).
std::string execute(const std::string &tool_name, const std::string &raw_args_json)
Execute a tool and wrap result in ServerResponse JSON.
Directive processing for tool-to-engine communication.
Activate model on GPU (WARM → ACTIVE).
@ optional
optional: every escape asks the host's path approver
Structured result from tool execution.
std::vector< Directive > directives
Engine-level side effects.
std::string result
Human-readable result.