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

File read tool that provides secure file reading capabilities. More...

#include <file_tool.h>

Inheritance diagram for agents::tools::FileReadTool:
agents::Tool

Public Member Functions

 FileReadTool ()
 Construct a new File Read Tool object.
 
ToolResult execute (const JsonObject &params) const override
 Execute the file read 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 read tool that provides secure file reading 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::FileReadTool::execute ( const JsonObject & params) const
overridevirtual

Execute the file read tool.

Parameters
paramsThe parameters for the file read tool
Returns
ToolResult The result of the file read 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