Agents 0.0.2
Edge AI Agents SDK
Loading...
Searching...
No Matches
agents::tools::FileWriteTool Class Reference

File write tool that provides secure file writing capabilities. More...

#include <file_tool.h>

Inheritance diagram for agents::tools::FileWriteTool:
agents::Tool

Public Member Functions

 FileWriteTool ()
 Construct a new File Write Tool object.
 
ToolResult execute (const JsonObject &params) const override
 Execute the file write tool.
 
const StringgetName () const
 Get the name of the tool.
 
const StringgetDescription () const
 Get the description of the tool.
 
const ParameterMapgetParameters () const
 Get the parameters of the tool.
 
const JsonObjectgetSchema () const
 Get the schema of the tool.
 
void addParameter (const Parameter &param)
 Add a parameter to the tool.
 
void setCallback (ToolCallback callback)
 Set the execution callback.
 
bool validateParameters (const JsonObject &params) const
 Validate parameters against schema.
 

Detailed Description

File write tool that provides secure file writing capabilities.

Member Function Documentation

◆ addParameter()

void agents::Tool::addParameter ( const Parameter & param)
inherited

Add a parameter to the tool.

Parameters
paramThe parameter to add

◆ execute()

ToolResult agents::tools::FileWriteTool::execute ( const JsonObject & params) const
overridevirtual

Execute the file write tool.

Parameters
paramsThe parameters for the file write tool
Returns
ToolResult The result of the file write tool

Reimplemented from agents::Tool.

◆ getDescription()

const String & agents::Tool::getDescription ( ) const
inherited

Get the description of the tool.

Returns
The description of the tool

◆ getName()

const String & agents::Tool::getName ( ) const
inherited

Get the name of the tool.

Returns
The name of the tool

◆ getParameters()

const ParameterMap & agents::Tool::getParameters ( ) const
inherited

Get the parameters of the tool.

Returns
The parameters of the tool

◆ getSchema()

const JsonObject & agents::Tool::getSchema ( ) const
inherited

Get the schema of the tool.

Returns
The schema of the tool

◆ setCallback()

void agents::Tool::setCallback ( ToolCallback callback)
inherited

Set the execution callback.

Parameters
callbackThe callback to set

◆ validateParameters()

bool agents::Tool::validateParameters ( const JsonObject & params) const
inherited

Validate parameters against schema.

Parameters
paramsThe parameters to validate
Returns
true of valid, otherwise false