Package com.axelor.ai.tool.builder
Class SaveSkillTool
java.lang.Object
com.axelor.ai.tool.builder.SaveSkillTool
- All Implemented Interfaces:
SystemTool<SaveSkillTool.Input>
Creates or updates a skill by code: its instructions, its text references and its procedures,
laid out as a skill directory is —
SKILL.md, references/*.md,
procedures.yaml.
Procedures are checked as a bundle import checks them, against the application as it is now: one that does not check out refuses the call, naming the procedure and the step. A skill does nothing until an agent links it, so a new one is saved enabled; a change to one that agents use names them on the approval card.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbeforeApproval(SaveSkillTool.Input input, ToolContext context) Looked at before the user is asked to approve a call, for a tool that needs approval: a refusal known up front should not cost the user a decision.callTitle(SaveSkillTool.Input input, String name) What to call one call of this tool, given what it was called with.code()Unique code matching AiTool.systemTool field.Brief description of what this tool does.execute(SaveSkillTool.Input input, ToolContext context) Execute with the given typed input and agent-scoped context.The input record class.name()Human-readable display name (e.g.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axelor.ai.tool.system.SystemTool
provideContext, refusal, runsOutsideTransaction, safety, undoneByRollback
-
Field Details
-
CODE
- See Also:
-
-
Method Details
-
code
Description copied from interface:SystemToolUnique code matching AiTool.systemTool field.- Specified by:
codein interfaceSystemTool<SaveSkillTool.Input>
-
name
Description copied from interface:SystemToolHuman-readable display name (e.g. "Search Records").- Specified by:
namein interfaceSystemTool<SaveSkillTool.Input>
-
description
Description copied from interface:SystemToolBrief description of what this tool does.- Specified by:
descriptionin interfaceSystemTool<SaveSkillTool.Input>
-
inputType
Description copied from interface:SystemToolThe input record class. ReturnVoid.classfor tools with no input.- Specified by:
inputTypein interfaceSystemTool<SaveSkillTool.Input>
-
callTitle
Description copied from interface:SystemToolWhat to call one call of this tool, given what it was called with.One call of a tool is not like the next: a tool that takes one record or several cannot be named accurately by its configuration alone. The name it is configured with is passed in, and returning it — as the default does — is what leaves the tool named the way the administrator named it.
- Specified by:
callTitlein interfaceSystemTool<SaveSkillTool.Input>- Parameters:
input- the call's input, or null when the tool takes nonename- the tool's configured display name
-
beforeApproval
Description copied from interface:SystemToolLooked at before the user is asked to approve a call, for a tool that needs approval: a refusal known up front should not cost the user a decision. Return anToolResult.Errorto refuse the call without asking, aToolResult.PendingApprovalto ask with what its card should show, or null to ask as usual. The call itself checks again when it runs.- Specified by:
beforeApprovalin interfaceSystemTool<SaveSkillTool.Input>- Parameters:
input- the call's input, or null when the tool takes nonecontext- the call's context
-
execute
Description copied from interface:SystemToolExecute with the given typed input and agent-scoped context.- Specified by:
executein interfaceSystemTool<SaveSkillTool.Input>
-