82 const std::string&
name()
const;
110 std::string
execute(
const std::string& tool_name,
111 const std::string& args_json);
124 const std::string& tool_name,
125 const std::string& args_json)
const;
137 const std::string& tool_name)
const;
147 virtual bool configure(
const std::string& config_json);
178 static std::string serialize_response(
const ServerResponse& response);
187 static void inject_anchor_if_needed(
189 const std::string& args_json,
Concrete base class for MCP servers (80% logic).
std::string list_tools() const
List all registered tools as a JSON array string.
std::string execute(const std::string &tool_name, const std::string &args_json)
Execute a tool and wrap result in ServerResponse JSON.
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).
Directive processing for tool-to-engine communication.
Activate model on GPU (WARM → ACTIVE).
Structured result from tool execution.
std::vector< Directive > directives
Engine-level side effects.
std::string result
Human-readable result.