Theia API Documentation v1.68.0
    Preparing search index...

    Interface ToolRequest<TContext>

    Defines a tool that can be invoked by language models.

    interface ToolRequest<
        TContext extends ToolInvocationContext = ToolInvocationContext,
    > {
        confirmAlwaysAllow?: string | boolean;
        description?: string;
        handler: (arg_string: string, ctx?: TContext) => Promise<ToolCallResult>;
        id: string;
        name: string;
        parameters: ToolRequestParameters;
        providerName?: string;
    }

    Type Parameters

    Index

    Properties

    confirmAlwaysAllow?: string | boolean

    If set, this tool requires extra confirmation before auto-approval can be enabled.

    When a tool has this flag:

    • It defaults to CONFIRM mode (not ALWAYS_ALLOW) even if global default is ALWAYS_ALLOW
    • When user selects "Always Allow", an extra confirmation modal is shown
    • The modal displays a warning about the tool's capabilities

    If a string is provided, it will be displayed as the custom warning message. If true, a generic warning message will be shown.

    Use for tools with broad system access (shell execution, file deletion, etc.)

    description?: string
    handler: (arg_string: string, ctx?: TContext) => Promise<ToolCallResult>
    id: string
    name: string
    providerName?: string