AIG. - AI Google Gemini Integration

<< 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

AIG.GetTools

Previous Top Next


MiniRobotLanguage (MRL)

 

AIG.GetTools
Retrieve the Current Tools Definition (Function Calling)

 

Intention

 

Retrieve the JSON string that defines the functions (tools) currently available for the AI model to potentially call during generation. This allows inspecting the function declarations that have been set.

 

What is the GetTools Command?

 

This Command returns the current value stored in the AIG_Tools global variable. This variable holds the string containing the JSON definitions of `FunctionDeclaration` objects, as set by the AIG.SetTools Command.

 

Why Do You Need It?

 

Use this Command to:

Verify Configuration: Check which functions are currently declared and available for the AI to call.

Debugging: Inspect the exact JSON being sent if function calling is not working as expected.

 

How to Use

 

Call the Command, optionally providing a variable name (P1) to store the resulting JSON definition string.

 

Example Usage

 

// Define and set a tool

$$MyTool = $"""{ "functionDeclarations": [ { "name": "find_train_schedule", ... } ] }"""

AIG.SetTools|@$$MyTool

 

// Retrieve the current tools definition

AIG.GetTools|$$CurrentTools

DBP. Current Tools JSON: @$$CurrentTools

 

Syntax

 

AIG.GetTools[|P1]

AIG.gtl[|P1]

 

Parameter Explanation

 

P1 - (Optional) The name of the variable (e.g., `$$MyVar`) where the retrieved tools JSON string should be stored.

 

Remarks

 

- Returns the exact string stored in the AIG_Tools global variable.

- An empty string indicates that function calling is currently disabled.

 

See also:

 

? AIG.SetTools

? AIG.SetToolChoice

? AIG. Commands Overview