AITool |
public class AIToolConfiguration : RootEditor
The AIToolConfiguration type exposes the following members.
| Name | Description | |
|---|---|---|
| AIToolConfiguration | Initializes a new instance of the AIToolConfiguration class |
| Name | Description | |
|---|---|---|
| CurrentToolCall | Set by Execute(AIToolCall) immediately before the script runs so that the script can access the current call's arguments, id, and name via @Model.CurrentToolCall. | |
| Description | Human-readable description of what the tool does, shown to the AI model to help it decide when to call the tool. | |
| EffectiveExecutionScript | Reads ExecutionScriptFile from Settings\AI\Scripts. Returns an empty string when no script file is configured. | |
| ExecResult | The script must assign the tool result string to this property. Execute(AIToolCall) returns this value after the Razor engine has run. | |
| ExecutionScriptFile | File name of a Razor/C# script file, relative to Settings\AI\Scripts. | |
| GUID | Unique identifier for this tool configuration. | |
| IsEnabled | When false, this tool is excluded from all agent calls without being deleted. | |
| Name | Unique function name sent to the AI model (e.g. get_report_data). Must contain only letters, digits, and underscores. | |
| ParametersSchema | JSON Schema string describing the function's parameters, sent to the AI model. Example: {"type":"object","properties":{"city":{"type":"string"}},"required":["city"]} Leave empty for tools that take no parameters. | |
| ProgressLabel | Friendly, end-user-facing text shown in the chat "thinking" panel while this tool runs, instead of the raw tool name. Supports {param} placeholders that are replaced by the matching argument values of the current call (e.g. Getting columns from table {table}). Translatable via the repository AIToolProgress context. Leave empty to fall back to a generic label built from the tool name. |
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Execute | Sets CurrentToolCall to toolCall, clears ExecResult, runs the ExecutionScriptFile via the Razor engine, and returns ExecResult as the tool result string to send back to the AI. Returns Empty if no script is configured. | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetAvailableDevices | Returns the output devices the current security context is allowed to use with the AI tools. When no security context is set, or the context defines no restriction, all repository devices are returned. Restrictions are defined through the OutputDeviceGUIDs of the user's security groups. | |
| GetAvailableSources | Returns the data sources the current security context is allowed to access with the AI tools. When no security context is set, or the context defines no restriction, all repository sources are returned. Restrictions are defined through the DataSourceGUIDs of the user's security groups. | |
| GetExecConnection | Resolves the connection to use for the given source. If connectionGuid is provided, returns the connection with that GUID; otherwise returns the source's current default connection. Returns null when source is null or no matching connection is found. | |
| GetExecSource | Resolves the data source to use when executing this tool call, restricted to the sources the current security context is allowed to access (see GetAvailableSources). If datasourceGuid is provided, returns the allowed source with that GUID; otherwise returns the default allowed source (or the first allowed source). Returns null when no matching allowed source is found. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetProgressLabel | Builds the user-facing "thinking" label shown in the chat panel while this tool runs: the translated ProgressLabel with any {param} placeholders replaced by the matching argument values from toolCall. Returns null when no label is configured so the caller can fall back to a generic label. | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| Init |
Init the editor objects
(Inherited from RootEditor) | |
| InitDefaultValues |
Init the default values
(Inherited from RootEditor) | |
| InitEditor |
Init the editor objects and the default values
(Inherited from RootEditor) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| SetReadOnly |
Set all properties to readonly
(Inherited from RootEditor) | |
| ToAITool | Returns an AITool instance built from this configuration. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| UpdateEditor |
Update editor attributes
(Inherited from RootEditor) | |
| UpdateEditorAttributes |
Refresh properties attrivutes
(Inherited from RootEditor) |
| Name | Description | |
|---|---|---|
| _dctd | (Inherited from RootEditor) |