Class SaveToolTool
- All Implemented Interfaces:
SystemTool<SaveToolTool.Input>
A new tool is saved disabled and asking for approval (invariant 3): an administrator reads its
script or endpoint and enables it. An existing one keeps its state, so rewriting an enabled
script puts it live once the save is approved — the card says so. Secrets are never an input
(invariant 4): a header or query parameter that carries a credential must reference one as
${secret.NAME}, and the administrator fills it on the tool's form. MCP tools come from their
server and client tools from the browser: neither is written here.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbeforeApproval(SaveToolTool.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(SaveToolTool.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(SaveToolTool.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<SaveToolTool.Input>
-
name
Description copied from interface:SystemToolHuman-readable display name (e.g. "Search Records").- Specified by:
namein interfaceSystemTool<SaveToolTool.Input>
-
description
Description copied from interface:SystemToolBrief description of what this tool does.- Specified by:
descriptionin interfaceSystemTool<SaveToolTool.Input>
-
inputType
Description copied from interface:SystemToolThe input record class. ReturnVoid.classfor tools with no input.- Specified by:
inputTypein interfaceSystemTool<SaveToolTool.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<SaveToolTool.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<SaveToolTool.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<SaveToolTool.Input>
-