Package ai.mindconnect.agent.tool
Class AliasTool
java.lang.Object
ai.mindconnect.agent.tool.AliasTool
- All Implemented Interfaces:
Tool
Lets an agent expose a registry tool under its own name. The override
{"tool": "vector_search"} means: resolve THAT factory, but present
it to the LLM as this AgentTool's name (and, when set, its
description). An agent can therefore carry the same underlying tool
twice without collision — e.g. search_project_docs pinned to a
knowledge store next to the plain session-scoped vector_search —
and the alias name itself documents intent to the model.
Applied by SpiToolRegistry.resolve(ai.mindconnect.agent.tool.AgentTool, ai.mindconnect.common.Namespace, java.lang.String, java.util.UUID) before parameter pinning, so
pins reference the underlying tool's real parameter names.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOverride key naming the registry tool to resolve instead of the agent-tool name. -
Method Summary
Modifier and TypeMethodDescriptionname()static StringregistryName(AgentTool agentTool) The registry name to resolve for this agent tool: alias target, else the tool's own name.booleanIf true, the tool result is streamed directly to the user before the LLM sees it.static ToolWrapsdelegateunder the agent tool's name when aliased; identity otherwise.
-
Field Details
-
OVERRIDE_KEY
Override key naming the registry tool to resolve instead of the agent-tool name.- See Also:
-
-
Method Details
-
registryName
The registry name to resolve for this agent tool: alias target, else the tool's own name. -
wrap
Wrapsdelegateunder the agent tool's name when aliased; identity otherwise. -
name
-
description
- Specified by:
descriptionin interfaceTool
-
parametersSchema
- Specified by:
parametersSchemain interfaceTool
-
execute
-
streamsResultToUser
public boolean streamsResultToUser()Description copied from interface:ToolIf true, the tool result is streamed directly to the user before the LLM sees it.- Specified by:
streamsResultToUserin interfaceTool
-