Agents 1.6.9
Edge AI Agents SDK
Loading...
Searching...
No Matches
agents::skills::MarkdownSkillTool Class Reference

Tool implementation for a Markdown-based skill. More...

#include <skill_loader.h>

Inheritance diagram for agents::skills::MarkdownSkillTool:
agents::Tool

Public Member Functions

 MarkdownSkillTool (const SkillMetadata &metadata)
 Construct a new Markdown Skill Tool object.
ToolResult execute (const JsonObject &params) const override
 Execute the tool.
const SkillMetadata & getMetadata () const
 Get the skill metadata.
double scoreRelevance (const std::string &query) const override
 Score the relevance of this skill to a given query.
const std::string & getName () const
 Get the name of the tool.
const std::string & getDescription () const
 Get the description of the tool.
const ParameterMap & getParameters () const
 Get the parameters of the tool.
const JsonObject & getSchema () const
 Get the schema of the tool.
void addParameter (const Parameter &param)
 Add a parameter to the tool.
void addParametersFromJson (const JsonObject &params)
 Add tool parameters from json definition.
void setCallback (ToolCallback callback)
 Set the execution callback.
bool validateParameters (const JsonObject &params) const
 Validate parameters against schema.

Detailed Description

Tool implementation for a Markdown-based skill.

Constructor & Destructor Documentation

◆ MarkdownSkillTool()

agents::skills::MarkdownSkillTool::MarkdownSkillTool ( const SkillMetadata & metadata)
explicit

Construct a new Markdown Skill Tool object.

Parameters
metadataThe skill metadata

Member Function Documentation

◆ addParameter()

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

Add a parameter to the tool.

Parameters
paramThe parameter to add

◆ addParametersFromJson()

void agents::Tool::addParametersFromJson ( const JsonObject & params)
inherited

Add tool parameters from json definition.

Parameters
paramsThe parameters to add

◆ execute()

ToolResult agents::skills::MarkdownSkillTool::execute ( const JsonObject & params) const
overridevirtual

Execute the tool.

Parameters
paramsExecution parameters
Returns
ToolResult The execution result

Reimplemented from agents::Tool.

◆ getDescription()

const std::string & agents::Tool::getDescription ( ) const
inherited

Get the description of the tool.

Returns
The description of the tool

◆ getMetadata()

const SkillMetadata & agents::skills::MarkdownSkillTool::getMetadata ( ) const

Get the skill metadata.

Returns
const SkillMetadata&

◆ getName()

const std::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

◆ scoreRelevance()

double agents::skills::MarkdownSkillTool::scoreRelevance ( const std::string & query) const
overridevirtual

Score the relevance of this skill to a given query.

Parameters
queryThe query to score against
Returns
double Relevance score (0.0 to 1.0)

Reimplemented from agents::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