Package: @effect/ai-anthropic
Module: AnthropicTool
Defines the computer-use tool for Claude 4 models and Claude Sonnet 3.7.
When to use
Use when you need Anthropic computer use for Claude 4 models or Claude Sonnet 3.7 with the 2025-01-24 action set.
Details
Requires the “computer-use-2025-01-24” beta header. Includes basic actions plus enhanced actions: scroll, left_click_drag, right_click, middle_click, double_click, triple_click, left_mouse_down, left_mouse_up, hold_key, wait.
See
ComputerUse_20241022 for the older basic action setComputerUse_20251124 for the newer zoom-capable versionSignature
declare const ComputerUse_20250124: <Mode extends Tool.FailureMode | undefined = undefined>(args: { readonly displayWidthPx: number; readonly displayHeightPx: number; readonly displayNumber?: number | undefined; readonly failureMode?: Mode | undefined; }) => Tool.ProviderDefined<"anthropic.computer_20250124", "AnthropicComputerUse", { readonly args: Schema.Struct<{ readonly displayWidthPx: Schema.Int; readonly displayHeightPx: Schema.Int; readonly displayNumber: Schema.optional<Schema.Int>; }>; readonly parameters: Schema.Union<readonly [Schema.Struct<{ readonly action: Schema.Literal<"key">; readonly text: Schema.String; }>, Schema.Struct<{ readonly action: Schema.Literal<"left_click">; readonly coordinate: Schema.optionalKey<Schema.Tuple<readonly [Schema.Int, Schema.Int]>>; }>, Schema.Struct<{ readonly action: Schema.Literal<"mouse_move">; readonly coordinate: Schema.Tuple<readonly [Schema.Int, Schema.Int]>; }>, Schema.Struct<{ readonly action: Schema.Literal<"screenshot">; }>, Schema.Struct<{ readonly action: Schema.Literal<"type">; readonly text: Schema.String; }>, Schema.Struct<{ readonly action: Schema.Literal<"double_click">; readonly coordinate: Schema.optionalKey<Schema.Tuple<readonly [Schema.Int, Schema.Int]>>; }>, Schema.Struct<{ readonly action: Schema.Literal<"hold_key">; readonly text: Schema.String; readonly duration: Schema.Finite; }>, Schema.Struct<{ readonly action: Schema.Literal<"left_click_drag">; readonly start_coordinate: Schema.Tuple<readonly [Schema.Int, Schema.Int]>; readonly coordinate: Schema.Tuple<readonly [Schema.Int, Schema.Int]>; }>, Schema.Struct<{ readonly action: Schema.Literal<"left_mouse_down">; readonly coordinate: Schema.optionalKey<Schema.Tuple<readonly [Schema.Int, Schema.Int]>>; }>, Schema.Struct<{ readonly action: Schema.Literal<"left_mouse_up">; readonly coordinate: Schema.optionalKey<Schema.Tuple<readonly [Schema.Int, Schema.Int]>>; }>, Schema.Struct<{ readonly action: Schema.Literal<"middle_click">; readonly coordinate: Schema.optionalKey<Schema.Tuple<readonly [Schema.Int, Schema.Int]>>; }>, Schema.Struct<{ readonly action: Schema.Literal<"right_click">; readonly coordinate: Schema.optionalKey<Schema.Tuple<readonly [Schema.Int, Schema.Int]>>; }>, Schema.Struct<{ readonly action: Schema.Literal<"scroll">; readonly coordinate: Schema.optionalKey<Schema.Tuple<readonly [Schema.Int, Schema.Int]>>; readonly scroll_direction: Schema.Literals<readonly ["up", "down", "left", "right"]>; readonly scroll_amount: Schema.Int; }>, Schema.Struct<{ readonly action: Schema.Literal<"triple_click">; readonly coordinate: Schema.optionalKey<Schema.Tuple<readonly [Schema.Int, Schema.Int]>>; }>, Schema.Struct<{ readonly action: Schema.Literal<"wait">; readonly duration: Schema.Finite; }>]>; readonly success: Schema.String; readonly failure: Schema.Never; readonly failureMode: Mode extends undefined ? "error" : Mode; }, true>
Since v4.0.0