AiTools

public static class AiTools
The fixed set of tools exposed to the model during code generation. The model picks one per turn; the tool name drives the routing logic on the host side, replacing any need to parse prose. Two are terminal (Compile delivers final code, Abandon gives up); the rest progress the conversation.

Fields

Abandon

#
public static readonly AiTool Abandon
Signals that the model has decided it cannot fulfil the request. Terminal, mutually exclusive with Compile. The host surfaces the reason string to the user and ends the conversation. Exists so the model has a sanctioned escape hatch when the prompt is impossible, contradictory, or out of scope -- without one, it gets stuck looping through clarifications until a budget trips.

Abandonment

#
public const string Abandonment = "Abandonment"
Name of the Abandon tool, used for routing in switch statements.

All

#
public static readonly AiTool[] All
The full set of tools offered on every generation turn.

Clarification

#
public const string Clarification = "Clarification"
Name of the Clarify tool, used for routing in switch statements.

Clarify

#
public static readonly AiTool Clarify
Asks the user a multiple-choice clarifying question. The host renders the options as radio buttons (or checkboxes if allowMultiple is set) and returns the user's selection as the tool result.

Compilation

#
public const string Compilation = "Compilation"
Name of the Compile tool, used for routing in switch statements.

Compile

#
public static readonly AiTool Compile
Delivers the final generated component. The host compiles the source, runs smoke checks, surfaces the behaviour summary for confirmation, and on confirmation assigns the resulting AiComponentLogic to the active component.

Describe

#
public static readonly AiTool Describe
Looks up Grasshopper2 SDK symbols. Use BEFORE writing code that uses an unfamiliar Grasshopper2 type or method, not after. The model is expected to call this aggressively rather than guess API shapes.

Description

#
public const string Description = "Description"
Name of the Describe tool, used for routing in switch statements.

Explain

#
public static readonly AiTool Explain
Fetches a worked code example for a Grasshopper2 idiom. Use when the answer is a pattern ('how do I iterate a data tree?') rather than a specific symbol lookup.

Explanation

#
public const string Explanation = "Explanation"
Name of the Explain tool, used for routing in switch statements.