Package ai.mindconnect.agent.tool
Class PinnedParamsTool
java.lang.Object
ai.mindconnect.agent.tool.PinnedParamsTool
- All Implemented Interfaces:
Tool
Enforces agent-pinned tool parameters. An
AgentTool override under
the params key is a map of parameter name → value that the agent's
configuration dictates: those values are written over whatever the LLM
passed before the tool executes, and the pinned parameters are
stripped from the schema the LLM sees — it cannot set what it is never
offered.
Applied centrally by SpiToolRegistry.resolve(ai.mindconnect.agent.tool.AgentTool, ai.mindconnect.common.Namespace, java.lang.String, java.util.UUID), so pinning works
uniformly for every tool source (built-in factories and multi-tool
providers alike) without the individual tool knowing about it.
Example agent-tool override:
"overrides": { "params": { "language": "python" } }
makes code_execute a Python-only tool for that agent: the LLM is
not offered a language parameter, and any value it passed anyway
would be replaced.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey insideAgentTool.overrides()holding the pinned map. -
Method Summary
-
Field Details
-
OVERRIDE_KEY
Key insideAgentTool.overrides()holding the pinned map.- See Also:
-
-
Method Details
-
wrap
Wrapsdelegatewhen the agent tool pins parameters; 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
-