Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::WriteFileTool Class Reference

Tool for writing file contents with read-before-write. More...

Inheritance diagram for entropic::WriteFileTool:
Collaboration diagram for entropic::WriteFileTool:

Public Member Functions

 WriteFileTool (FilesystemServer &server, const std::string &data_dir)
 Construct from server reference and data directory.
 
ServerResponse execute (const std::string &args_json) override
 Write content to a file after read-before-write check.
 
- Public Member Functions inherited from entropic::ToolBase
 ToolBase (ToolDefinition def)
 Construct with a pre-built definition.
 
const std::string & name () const
 Get the tool name.
 
const ToolDefinitiondefinition () const
 Get the full tool definition.
 
virtual std::string anchor_key (const std::string &args_json) const
 Generate anchor key for this tool result.
 
virtual MCPAccessLevel required_access_level () const
 Minimum access level required to execute this tool.
 

Additional Inherited Members

- Protected Attributes inherited from entropic::ToolBase
ToolDefinition definition_
 Tool definition.
 

Detailed Description

Tool for writing file contents with read-before-write.

Definition at line 890 of file filesystem.cpp.

Constructor & Destructor Documentation

◆ WriteFileTool()

entropic::WriteFileTool::WriteFileTool ( FilesystemServer server,
const std::string &  data_dir 
)
inline

Construct from server reference and data directory.

Parameters
serverOwning filesystem server.
data_dirPath to bundled data directory.

Definition at line 899 of file filesystem.cpp.

Member Function Documentation

◆ execute()

ServerResponse entropic::WriteFileTool::execute ( const std::string &  args_json)
overridevirtual

Write content to a file after read-before-write check.

Execute write_file: resolve, enforce policy, write.

Parameters
args_jsonJSON with "path" and "content" keys.
Returns
ServerResponse with result or error.
Parameters
args_jsonJSON arguments.
Returns
ServerResponse with result.

Implements entropic::ToolBase.

Definition at line 926 of file filesystem.cpp.


The documentation for this class was generated from the following file: