|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIG. - Google AI > A.Tools-Configuration > AIG. - AI Google Gemini Integration |
MiniRobotLanguage (MRL)
AIG.ClearToolMap
Manage Tool-to-Script Mappings
Intention
To remove the link between a specific AI Tool and a Script Label, without removing the tool definition itself. This allows you to stop AIG.DoToolCall from automatically jumping to a subroutine, giving you manual control or the ability to re-map the tool to a different label.
It modifies the internal registry (Map) created by AIG.MapToolHandler. It does not change the JSON sent to Google, so the AI still "knows" the tool exists.
�Dynamic Re-routing: You might want "save_file" to go to :SaveLocal in one part of the script, and :SaveCloud in another. Clear the map and re-map it.
�Switching to Manual Mode: You want the AI to still *call* the function, but you want to handle it using If..Then logic instead of an automatic GOSUB.
�Partial Cleanup: Remove one specific stale handler without resetting the entire toolset.
' 1. Map tool "calc" to a label
AIG.MapToolHandler|calc|:MyCalcSub
' ... (AI operations) ...
' 2. Remove the mapping for "calc"
' AIG.DoToolCall will now ignore "calc" calls
AIG.ClearToolMap|calc
' 3. Clear ALL mappings (Tools still exist in JSON)
AIG.ClearToolMap
Syntax
AIG.ClearToolMap[|P1]
AIG.ctm[|P1]
Parameter Explanation
P1 - (Optional) The Tool Name string.
�If provided (e.g., "calc"), only the mapping for that specific tool is removed.
�If omitted or empty (`""`), ALL mappings are cleared.
See also:
? AIG.ClearTools (Clear JSON + Map)
? AIG.MapToolHandler (Create mapping)