@effect/ai-anthropic 4.0.0-beta.7 → 4.0.0-beta.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnthropicClient.d.ts +40 -66
- package/dist/AnthropicClient.d.ts.map +1 -1
- package/dist/AnthropicClient.js +12 -14
- package/dist/AnthropicClient.js.map +1 -1
- package/dist/AnthropicConfig.d.ts +46 -10
- package/dist/AnthropicConfig.d.ts.map +1 -1
- package/dist/AnthropicConfig.js +31 -7
- package/dist/AnthropicConfig.js.map +1 -1
- package/dist/AnthropicError.d.ts +128 -37
- package/dist/AnthropicError.d.ts.map +1 -1
- package/dist/AnthropicError.js +1 -1
- package/dist/AnthropicLanguageModel.d.ts +281 -66
- package/dist/AnthropicLanguageModel.d.ts.map +1 -1
- package/dist/AnthropicLanguageModel.js +50 -14
- package/dist/AnthropicLanguageModel.js.map +1 -1
- package/dist/AnthropicTelemetry.d.ts +23 -16
- package/dist/AnthropicTelemetry.d.ts.map +1 -1
- package/dist/AnthropicTelemetry.js +6 -4
- package/dist/AnthropicTelemetry.js.map +1 -1
- package/dist/AnthropicTool.d.ts +298 -138
- package/dist/AnthropicTool.d.ts.map +1 -1
- package/dist/AnthropicTool.js +141 -87
- package/dist/AnthropicTool.js.map +1 -1
- package/dist/Generated.d.ts +11661 -5260
- package/dist/Generated.d.ts.map +1 -1
- package/dist/Generated.js +2318 -915
- package/dist/Generated.js.map +1 -1
- package/dist/index.d.ts +52 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -8
- package/dist/index.js.map +1 -1
- package/dist/internal/errors.js +7 -7
- package/dist/internal/errors.js.map +1 -1
- package/package.json +3 -3
- package/src/AnthropicClient.ts +41 -67
- package/src/AnthropicConfig.ts +47 -11
- package/src/AnthropicError.ts +130 -37
- package/src/AnthropicLanguageModel.ts +274 -33
- package/src/AnthropicTelemetry.ts +24 -17
- package/src/AnthropicTool.ts +293 -133
- package/src/Generated.ts +3751 -1815
- package/src/index.ts +52 -8
- package/src/internal/errors.ts +9 -7
package/dist/AnthropicTool.d.ts
CHANGED
|
@@ -4,25 +4,27 @@
|
|
|
4
4
|
* Provides tools that are natively supported by Anthropic's API, including
|
|
5
5
|
* Bash, Code Execution, Computer Use, Memory, and Text Editor functionality.
|
|
6
6
|
*
|
|
7
|
-
* @since
|
|
7
|
+
* @since 4.0.0
|
|
8
8
|
*/
|
|
9
9
|
import * as Schema from "effect/Schema";
|
|
10
10
|
import * as Tool from "effect/unstable/ai/Tool";
|
|
11
11
|
/**
|
|
12
12
|
* Union of all Anthropic provider-defined tools.
|
|
13
13
|
*
|
|
14
|
-
* @since 1.0.0
|
|
15
14
|
* @category models
|
|
15
|
+
* @since 4.0.0
|
|
16
16
|
*/
|
|
17
17
|
export type AnthropicTool = ReturnType<typeof Bash_20241022> | ReturnType<typeof Bash_20250124> | ReturnType<typeof CodeExecution_20250522> | ReturnType<typeof CodeExecution_20250825> | ReturnType<typeof ComputerUse_20241022> | ReturnType<typeof ComputerUse_20250124> | ReturnType<typeof ComputerUse_20251124> | ReturnType<typeof Memory_20250818> | ReturnType<typeof TextEditor_20241022> | ReturnType<typeof TextEditor_20250124> | ReturnType<typeof TextEditor_20250429> | ReturnType<typeof TextEditor_20250728> | ReturnType<typeof ToolSearchRegex_20251119> | ReturnType<typeof ToolSearchBM25_20251119> | ReturnType<typeof WebFetch_20250910> | ReturnType<typeof WebSearch_20250305>;
|
|
18
18
|
/**
|
|
19
19
|
* Anthropic Bash tool (2024-10-22 version).
|
|
20
20
|
*
|
|
21
|
+
* **Details**
|
|
22
|
+
*
|
|
21
23
|
* Allows the model to execute bash commands in a sandboxed environment.
|
|
22
24
|
* Requires the "computer-use-2024-10-22" beta header.
|
|
23
25
|
*
|
|
24
|
-
* @since 1.0.0
|
|
25
26
|
* @category Bash
|
|
27
|
+
* @since 4.0.0
|
|
26
28
|
*/
|
|
27
29
|
export declare const Bash_20241022: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
28
30
|
readonly failureMode?: Mode | undefined;
|
|
@@ -39,11 +41,13 @@ export declare const Bash_20241022: <Mode extends Tool.FailureMode | undefined =
|
|
|
39
41
|
/**
|
|
40
42
|
* Anthropic Bash tool (2025-01-24 version).
|
|
41
43
|
*
|
|
44
|
+
* **Details**
|
|
45
|
+
*
|
|
42
46
|
* Allows the model to execute bash commands in a sandboxed environment.
|
|
43
47
|
* Requires the "computer-use-2025-01-24" beta header.
|
|
44
48
|
*
|
|
45
|
-
* @since 1.0.0
|
|
46
49
|
* @category Bash
|
|
50
|
+
* @since 4.0.0
|
|
47
51
|
*/
|
|
48
52
|
export declare const Bash_20250124: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
49
53
|
readonly failureMode?: Mode | undefined;
|
|
@@ -58,10 +62,10 @@ export declare const Bash_20250124: <Mode extends Tool.FailureMode | undefined =
|
|
|
58
62
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
59
63
|
}, true>;
|
|
60
64
|
/**
|
|
61
|
-
*
|
|
65
|
+
* Schema for a code execution request that asks Anthropic to run source code as a programmatic tool call.
|
|
62
66
|
*
|
|
63
|
-
* @since 1.0.0
|
|
64
67
|
* @category Code Execution
|
|
68
|
+
* @since 4.0.0
|
|
65
69
|
*/
|
|
66
70
|
export declare const CodeExecutionProgrammaticToolCall: Schema.Struct<{
|
|
67
71
|
readonly type: Schema.Literal<"programmatic-tool-call">;
|
|
@@ -71,15 +75,17 @@ export declare const CodeExecutionProgrammaticToolCall: Schema.Struct<{
|
|
|
71
75
|
readonly code: Schema.String;
|
|
72
76
|
}>;
|
|
73
77
|
/**
|
|
74
|
-
*
|
|
78
|
+
* Input payload for a programmatic code execution tool call, including the source code to execute.
|
|
79
|
+
*
|
|
75
80
|
* @category Code Execution
|
|
81
|
+
* @since 4.0.0
|
|
76
82
|
*/
|
|
77
83
|
export type CodeExecutionProgrammaticToolCall = typeof CodeExecutionProgrammaticToolCall.Type;
|
|
78
84
|
/**
|
|
79
|
-
*
|
|
85
|
+
* Schema for a code execution request that runs a bash command.
|
|
80
86
|
*
|
|
81
|
-
* @since 1.0.0
|
|
82
87
|
* @category Code Execution
|
|
88
|
+
* @since 4.0.0
|
|
83
89
|
*/
|
|
84
90
|
export declare const CodeExecutionBashCommand: Schema.Struct<{
|
|
85
91
|
readonly type: Schema.Literal<"bash_code_execution">;
|
|
@@ -89,15 +95,17 @@ export declare const CodeExecutionBashCommand: Schema.Struct<{
|
|
|
89
95
|
readonly command: Schema.String;
|
|
90
96
|
}>;
|
|
91
97
|
/**
|
|
92
|
-
*
|
|
98
|
+
* Input payload for a bash command executed through Anthropic code execution.
|
|
99
|
+
*
|
|
93
100
|
* @category Code Execution
|
|
101
|
+
* @since 4.0.0
|
|
94
102
|
*/
|
|
95
103
|
export type CodeExecutionBashCommand = typeof CodeExecutionBashCommand.Type;
|
|
96
104
|
/**
|
|
97
105
|
* Text editor view command for code execution.
|
|
98
106
|
*
|
|
99
|
-
* @since 1.0.0
|
|
100
107
|
* @category Code Execution
|
|
108
|
+
* @since 4.0.0
|
|
101
109
|
*/
|
|
102
110
|
export declare const CodeExecutionTextEditorView: Schema.Struct<{
|
|
103
111
|
readonly type: Schema.Literal<"text_editor_code_execution">;
|
|
@@ -108,15 +116,17 @@ export declare const CodeExecutionTextEditorView: Schema.Struct<{
|
|
|
108
116
|
readonly path: Schema.String;
|
|
109
117
|
}>;
|
|
110
118
|
/**
|
|
111
|
-
*
|
|
119
|
+
* Input payload for viewing a file through the text editor code execution tool.
|
|
120
|
+
*
|
|
112
121
|
* @category Code Execution
|
|
122
|
+
* @since 4.0.0
|
|
113
123
|
*/
|
|
114
124
|
export type CodeExecutionTextEditorView = typeof CodeExecutionTextEditorView.Type;
|
|
115
125
|
/**
|
|
116
126
|
* Text editor create command for code execution.
|
|
117
127
|
*
|
|
118
|
-
* @since 1.0.0
|
|
119
128
|
* @category Code Execution
|
|
129
|
+
* @since 4.0.0
|
|
120
130
|
*/
|
|
121
131
|
export declare const CodeExecutionTextEditorCreate: Schema.Struct<{
|
|
122
132
|
readonly type: Schema.Literal<"text_editor_code_execution">;
|
|
@@ -131,15 +141,17 @@ export declare const CodeExecutionTextEditorCreate: Schema.Struct<{
|
|
|
131
141
|
readonly file_text: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
132
142
|
}>;
|
|
133
143
|
/**
|
|
134
|
-
*
|
|
144
|
+
* Input payload for creating a file through the text editor code execution tool, optionally including initial file text.
|
|
145
|
+
*
|
|
135
146
|
* @category Code Execution
|
|
147
|
+
* @since 4.0.0
|
|
136
148
|
*/
|
|
137
149
|
export type CodeExecutionTextEditorCreate = typeof CodeExecutionTextEditorCreate.Type;
|
|
138
150
|
/**
|
|
139
151
|
* Text editor str_replace command for code execution.
|
|
140
152
|
*
|
|
141
|
-
* @since 1.0.0
|
|
142
153
|
* @category Code Execution
|
|
154
|
+
* @since 4.0.0
|
|
143
155
|
*/
|
|
144
156
|
export declare const CodeExecutionTextEditorStrReplace: Schema.Struct<{
|
|
145
157
|
readonly type: Schema.Literal<"text_editor_code_execution">;
|
|
@@ -158,15 +170,17 @@ export declare const CodeExecutionTextEditorStrReplace: Schema.Struct<{
|
|
|
158
170
|
readonly new_str: Schema.String;
|
|
159
171
|
}>;
|
|
160
172
|
/**
|
|
161
|
-
*
|
|
173
|
+
* Input payload for replacing text in a file through the text editor code execution tool.
|
|
174
|
+
*
|
|
162
175
|
* @category Code Execution
|
|
176
|
+
* @since 4.0.0
|
|
163
177
|
*/
|
|
164
178
|
export type CodeExecutionTextEditorStrReplace = typeof CodeExecutionTextEditorStrReplace.Type;
|
|
165
179
|
/**
|
|
166
|
-
*
|
|
180
|
+
* Schema for the 2025-08-25 code execution tool input, containing the code to execute.
|
|
167
181
|
*
|
|
168
|
-
* @since 1.0.0
|
|
169
182
|
* @category Code Execution
|
|
183
|
+
* @since 4.0.0
|
|
170
184
|
*/
|
|
171
185
|
export declare const CodeExecution_20250825_Parameters: Schema.Struct<{
|
|
172
186
|
/**
|
|
@@ -175,19 +189,23 @@ export declare const CodeExecution_20250825_Parameters: Schema.Struct<{
|
|
|
175
189
|
readonly code: Schema.String;
|
|
176
190
|
}>;
|
|
177
191
|
/**
|
|
178
|
-
*
|
|
192
|
+
* Input payload for the 2025-08-25 Anthropic code execution tool.
|
|
193
|
+
*
|
|
179
194
|
* @category Code Execution
|
|
195
|
+
* @since 4.0.0
|
|
180
196
|
*/
|
|
181
197
|
export type CodeExecution_20250825_Parameters = typeof CodeExecution_20250825_Parameters.Type;
|
|
182
198
|
/**
|
|
183
199
|
* Anthropic Code Execution tool (2025-05-22 version).
|
|
184
200
|
*
|
|
201
|
+
* **Details**
|
|
202
|
+
*
|
|
185
203
|
* Allows the model to execute code in a sandboxed environment with support
|
|
186
204
|
* for multiple execution types including programmatic tool calls, bash
|
|
187
205
|
* execution, and text editor operations.
|
|
188
206
|
*
|
|
189
|
-
* @since 1.0.0
|
|
190
207
|
* @category Code Execution
|
|
208
|
+
* @since 4.0.0
|
|
191
209
|
*/
|
|
192
210
|
export declare const CodeExecution_20250522: <Mode extends Tool.FailureMode | undefined = undefined>(args: void) => Tool.ProviderDefined<"anthropic.code_execution_20250522", "AnthropicCodeExecution", {
|
|
193
211
|
readonly args: Schema.Void;
|
|
@@ -256,10 +274,12 @@ export declare const CodeExecution_20250522: <Mode extends Tool.FailureMode | un
|
|
|
256
274
|
/**
|
|
257
275
|
* Anthropic Code Execution tool (2025-08-25 version).
|
|
258
276
|
*
|
|
277
|
+
* **Details**
|
|
278
|
+
*
|
|
259
279
|
* Allows the model to execute code in a sandboxed environment.
|
|
260
280
|
*
|
|
261
|
-
* @since 1.0.0
|
|
262
281
|
* @category Code Execution
|
|
282
|
+
* @since 4.0.0
|
|
263
283
|
*/
|
|
264
284
|
export declare const CodeExecution_20250825: <Mode extends Tool.FailureMode | undefined = undefined>(args: void) => Tool.ProviderDefined<"anthropic.code_execution_20250825", "AnthropicCodeExecution", {
|
|
265
285
|
readonly args: Schema.Void;
|
|
@@ -321,56 +341,64 @@ export declare const CodeExecution_20250825: <Mode extends Tool.FailureMode | un
|
|
|
321
341
|
/**
|
|
322
342
|
* An `[x, y]` pixel position.
|
|
323
343
|
*
|
|
324
|
-
* @since 1.0.0
|
|
325
344
|
* @category Computer Use
|
|
345
|
+
* @since 4.0.0
|
|
326
346
|
*/
|
|
327
347
|
export declare const Coordinate: Schema.Tuple<readonly [Schema.Number, Schema.Number]>;
|
|
328
348
|
/**
|
|
329
|
-
*
|
|
349
|
+
* An `[x, y]` screen coordinate in pixels.
|
|
350
|
+
*
|
|
330
351
|
* @category Computer Use
|
|
352
|
+
* @since 4.0.0
|
|
331
353
|
*/
|
|
332
354
|
export type Coordinate = typeof Coordinate.Type;
|
|
333
355
|
/**
|
|
334
356
|
* A `[x1, y1, x2, y2]` position defining top-left and bottom-right corners.
|
|
335
357
|
*
|
|
336
|
-
* @since 1.0.0
|
|
337
358
|
* @category Computer Use
|
|
359
|
+
* @since 4.0.0
|
|
338
360
|
*/
|
|
339
361
|
export declare const Region: Schema.Tuple<readonly [Schema.Number, Schema.Number, Schema.Number, Schema.Number]>;
|
|
340
362
|
/**
|
|
341
|
-
*
|
|
363
|
+
* An `[x1, y1, x2, y2]` screen region in pixels, from top-left to bottom-right.
|
|
364
|
+
*
|
|
342
365
|
* @category Computer Use
|
|
366
|
+
* @since 4.0.0
|
|
343
367
|
*/
|
|
344
368
|
export type Region = typeof Region.Type;
|
|
345
369
|
/**
|
|
346
370
|
* The direction of the scroll for scroll actions.
|
|
347
371
|
*
|
|
348
|
-
* @since 1.0.0
|
|
349
372
|
* @category Computer Use
|
|
373
|
+
* @since 4.0.0
|
|
350
374
|
*/
|
|
351
375
|
export declare const ScrollDirection: Schema.Literals<readonly ["up", "down", "left", "right"]>;
|
|
352
376
|
/**
|
|
353
|
-
*
|
|
377
|
+
* Direction used by computer-use scroll actions: `"up"`, `"down"`, `"left"`, or `"right"`.
|
|
378
|
+
*
|
|
354
379
|
* @category Computer Use
|
|
380
|
+
* @since 4.0.0
|
|
355
381
|
*/
|
|
356
382
|
export type ScrollDirection = typeof ScrollDirection.Type;
|
|
357
383
|
/**
|
|
358
384
|
* Modifier keys that can be held during click/scroll actions.
|
|
359
385
|
*
|
|
360
|
-
* @since 1.0.0
|
|
361
386
|
* @category Computer Use
|
|
387
|
+
* @since 4.0.0
|
|
362
388
|
*/
|
|
363
389
|
export declare const ModifierKey: Schema.Literals<readonly ["alt", "ctrl", "meta", "shift"]>;
|
|
364
390
|
/**
|
|
365
|
-
*
|
|
391
|
+
* Modifier key that can be held during computer-use click or scroll actions.
|
|
392
|
+
*
|
|
366
393
|
* @category Computer Use
|
|
394
|
+
* @since 4.0.0
|
|
367
395
|
*/
|
|
368
396
|
export type ModifierKey = typeof ModifierKey.Type;
|
|
369
397
|
/**
|
|
370
398
|
* Press a key or key combination (e.g. `"Return"`, `"ctrl+c"`, `"ctrl+s"`).
|
|
371
399
|
*
|
|
372
|
-
* @since 1.0.0
|
|
373
400
|
* @category Computer Use
|
|
401
|
+
* @since 4.0.0
|
|
374
402
|
*/
|
|
375
403
|
export declare const ComputerUseKeyAction: Schema.Struct<{
|
|
376
404
|
readonly action: Schema.Literal<"key">;
|
|
@@ -380,15 +408,17 @@ export declare const ComputerUseKeyAction: Schema.Struct<{
|
|
|
380
408
|
readonly text: Schema.String;
|
|
381
409
|
}>;
|
|
382
410
|
/**
|
|
383
|
-
*
|
|
411
|
+
* Computer-use action payload for pressing a key or key combination.
|
|
412
|
+
*
|
|
384
413
|
* @category Computer Use
|
|
414
|
+
* @since 4.0.0
|
|
385
415
|
*/
|
|
386
416
|
export type ComputerUseKeyAction = typeof ComputerUseKeyAction.Type;
|
|
387
417
|
/**
|
|
388
418
|
* Perform a left click at the current mouse position or the specified coordinates.
|
|
389
419
|
*
|
|
390
|
-
* @since 1.0.0
|
|
391
420
|
* @category Computer Use
|
|
421
|
+
* @since 4.0.0
|
|
392
422
|
*/
|
|
393
423
|
export declare const ComputerUseLeftClickAction: Schema.Struct<{
|
|
394
424
|
readonly action: Schema.Literal<"left_click">;
|
|
@@ -399,15 +429,17 @@ export declare const ComputerUseLeftClickAction: Schema.Struct<{
|
|
|
399
429
|
readonly coordinate: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
400
430
|
}>;
|
|
401
431
|
/**
|
|
402
|
-
*
|
|
432
|
+
* Computer-use action payload for performing a left click, optionally at a specific coordinate.
|
|
433
|
+
*
|
|
403
434
|
* @category Computer Use
|
|
435
|
+
* @since 4.0.0
|
|
404
436
|
*/
|
|
405
437
|
export type ComputerUseLeftClickAction = typeof ComputerUseLeftClickAction.Type;
|
|
406
438
|
/**
|
|
407
439
|
* Move the mouse cursor to the specified coordinates.
|
|
408
440
|
*
|
|
409
|
-
* @since 1.0.0
|
|
410
441
|
* @category Computer Use
|
|
442
|
+
* @since 4.0.0
|
|
411
443
|
*/
|
|
412
444
|
export declare const ComputerUseMouseMoveAction: Schema.Struct<{
|
|
413
445
|
readonly action: Schema.Literal<"mouse_move">;
|
|
@@ -417,29 +449,33 @@ export declare const ComputerUseMouseMoveAction: Schema.Struct<{
|
|
|
417
449
|
readonly coordinate: Schema.Tuple<readonly [Schema.Number, Schema.Number]>;
|
|
418
450
|
}>;
|
|
419
451
|
/**
|
|
420
|
-
*
|
|
452
|
+
* Computer-use action payload for moving the mouse cursor to a specific coordinate.
|
|
453
|
+
*
|
|
421
454
|
* @category Computer Use
|
|
455
|
+
* @since 4.0.0
|
|
422
456
|
*/
|
|
423
457
|
export type ComputerUseMouseMoveAction = typeof ComputerUseMouseMoveAction.Type;
|
|
424
458
|
/**
|
|
425
459
|
* Capture the current display.
|
|
426
460
|
*
|
|
427
|
-
* @since 1.0.0
|
|
428
461
|
* @category Computer Use
|
|
462
|
+
* @since 4.0.0
|
|
429
463
|
*/
|
|
430
464
|
export declare const ComputerUseScreenshotAction: Schema.Struct<{
|
|
431
465
|
readonly action: Schema.Literal<"screenshot">;
|
|
432
466
|
}>;
|
|
433
467
|
/**
|
|
434
|
-
*
|
|
468
|
+
* Computer-use action payload for capturing the current display.
|
|
469
|
+
*
|
|
435
470
|
* @category Computer Use
|
|
471
|
+
* @since 4.0.0
|
|
436
472
|
*/
|
|
437
473
|
export type ComputerUseScreenshotAction = typeof ComputerUseScreenshotAction.Type;
|
|
438
474
|
/**
|
|
439
475
|
* Type a text string.
|
|
440
476
|
*
|
|
441
|
-
* @since 1.0.0
|
|
442
477
|
* @category Computer Use
|
|
478
|
+
* @since 4.0.0
|
|
443
479
|
*/
|
|
444
480
|
export declare const TypeAction: Schema.Struct<{
|
|
445
481
|
readonly action: Schema.Literal<"type">;
|
|
@@ -449,15 +485,17 @@ export declare const TypeAction: Schema.Struct<{
|
|
|
449
485
|
readonly text: Schema.String;
|
|
450
486
|
}>;
|
|
451
487
|
/**
|
|
452
|
-
*
|
|
488
|
+
* Computer-use action payload for typing a text string.
|
|
489
|
+
*
|
|
453
490
|
* @category Computer Use
|
|
491
|
+
* @since 4.0.0
|
|
454
492
|
*/
|
|
455
493
|
export type TypeAction = typeof TypeAction.Type;
|
|
456
494
|
/**
|
|
457
495
|
* Perform a double click.
|
|
458
496
|
*
|
|
459
|
-
* @since 1.0.0
|
|
460
497
|
* @category Computer Use
|
|
498
|
+
* @since 4.0.0
|
|
461
499
|
*/
|
|
462
500
|
export declare const ComputerUseDoubleClickAction: Schema.Struct<{
|
|
463
501
|
readonly action: Schema.Literal<"double_click">;
|
|
@@ -468,15 +506,17 @@ export declare const ComputerUseDoubleClickAction: Schema.Struct<{
|
|
|
468
506
|
readonly coordinate: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
469
507
|
}>;
|
|
470
508
|
/**
|
|
471
|
-
*
|
|
509
|
+
* Computer-use action payload for performing a double click, optionally at a specific coordinate.
|
|
510
|
+
*
|
|
472
511
|
* @category Computer Use
|
|
512
|
+
* @since 4.0.0
|
|
473
513
|
*/
|
|
474
514
|
export type ComputerUseDoubleClickAction = typeof ComputerUseDoubleClickAction.Type;
|
|
475
515
|
/**
|
|
476
|
-
*
|
|
516
|
+
* Hold a key for a specified duration during computer-use execution.
|
|
477
517
|
*
|
|
478
|
-
* @since 1.0.0
|
|
479
518
|
* @category Computer Use
|
|
519
|
+
* @since 4.0.0
|
|
480
520
|
*/
|
|
481
521
|
export declare const ComputerUseHoldKeyAction: Schema.Struct<{
|
|
482
522
|
readonly action: Schema.Literal<"hold_key">;
|
|
@@ -490,15 +530,17 @@ export declare const ComputerUseHoldKeyAction: Schema.Struct<{
|
|
|
490
530
|
readonly duration: Schema.Number;
|
|
491
531
|
}>;
|
|
492
532
|
/**
|
|
493
|
-
*
|
|
533
|
+
* Computer-use action payload for holding a key for a specified duration.
|
|
534
|
+
*
|
|
494
535
|
* @category Computer Use
|
|
536
|
+
* @since 4.0.0
|
|
495
537
|
*/
|
|
496
538
|
export type ComputerUseHoldKeyAction = typeof ComputerUseHoldKeyAction.Type;
|
|
497
539
|
/**
|
|
498
540
|
* Click and drag from start coordinate to end coordinate.
|
|
499
541
|
*
|
|
500
|
-
* @since 1.0.0
|
|
501
542
|
* @category Computer Use
|
|
543
|
+
* @since 4.0.0
|
|
502
544
|
*/
|
|
503
545
|
export declare const ComputerUseLeftClickDragAction: Schema.Struct<{
|
|
504
546
|
readonly action: Schema.Literal<"left_click_drag">;
|
|
@@ -512,17 +554,21 @@ export declare const ComputerUseLeftClickDragAction: Schema.Struct<{
|
|
|
512
554
|
readonly coordinate: Schema.Tuple<readonly [Schema.Number, Schema.Number]>;
|
|
513
555
|
}>;
|
|
514
556
|
/**
|
|
515
|
-
*
|
|
557
|
+
* Computer-use action payload for dragging from a start coordinate to an end coordinate.
|
|
558
|
+
*
|
|
516
559
|
* @category Computer Use
|
|
560
|
+
* @since 4.0.0
|
|
517
561
|
*/
|
|
518
562
|
export type ComputerUseLeftClickDragAction = typeof ComputerUseLeftClickDragAction.Type;
|
|
519
563
|
/**
|
|
520
564
|
* Press the left mouse button down (without releasing).
|
|
521
565
|
*
|
|
522
|
-
*
|
|
566
|
+
* **When to use**
|
|
567
|
+
*
|
|
568
|
+
* Use this for fine-grained click control.
|
|
523
569
|
*
|
|
524
|
-
* @since 1.0.0
|
|
525
570
|
* @category Computer Use
|
|
571
|
+
* @since 4.0.0
|
|
526
572
|
*/
|
|
527
573
|
export declare const ComputerUseLeftMouseDownAction: Schema.Struct<{
|
|
528
574
|
readonly action: Schema.Literal<"left_mouse_down">;
|
|
@@ -533,17 +579,21 @@ export declare const ComputerUseLeftMouseDownAction: Schema.Struct<{
|
|
|
533
579
|
readonly coordinate: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
534
580
|
}>;
|
|
535
581
|
/**
|
|
536
|
-
*
|
|
582
|
+
* Computer-use action payload for pressing and holding the left mouse button, optionally at a specific coordinate.
|
|
583
|
+
*
|
|
537
584
|
* @category Computer Use
|
|
585
|
+
* @since 4.0.0
|
|
538
586
|
*/
|
|
539
587
|
export type ComputerUseLeftMouseDownAction = typeof ComputerUseLeftMouseDownAction.Type;
|
|
540
588
|
/**
|
|
541
589
|
* Release the left mouse button.
|
|
542
590
|
*
|
|
543
|
-
*
|
|
591
|
+
* **When to use**
|
|
592
|
+
*
|
|
593
|
+
* Use this for fine-grained click control.
|
|
544
594
|
*
|
|
545
|
-
* @since 1.0.0
|
|
546
595
|
* @category Computer Use
|
|
596
|
+
* @since 4.0.0
|
|
547
597
|
*/
|
|
548
598
|
export declare const ComputerUseLeftMouseUpAction: Schema.Struct<{
|
|
549
599
|
readonly action: Schema.Literal<"left_mouse_up">;
|
|
@@ -554,15 +604,17 @@ export declare const ComputerUseLeftMouseUpAction: Schema.Struct<{
|
|
|
554
604
|
readonly coordinate: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
555
605
|
}>;
|
|
556
606
|
/**
|
|
557
|
-
*
|
|
607
|
+
* Computer-use action payload for releasing the left mouse button, optionally at a specific coordinate.
|
|
608
|
+
*
|
|
558
609
|
* @category Computer Use
|
|
610
|
+
* @since 4.0.0
|
|
559
611
|
*/
|
|
560
612
|
export type ComputerUseLeftMouseUpAction = typeof ComputerUseLeftMouseUpAction.Type;
|
|
561
613
|
/**
|
|
562
614
|
* Perform a middle click.
|
|
563
615
|
*
|
|
564
|
-
* @since 1.0.0
|
|
565
616
|
* @category Computer Use
|
|
617
|
+
* @since 4.0.0
|
|
566
618
|
*/
|
|
567
619
|
export declare const ComputerUseMiddleClickAction: Schema.Struct<{
|
|
568
620
|
readonly action: Schema.Literal<"middle_click">;
|
|
@@ -573,15 +625,17 @@ export declare const ComputerUseMiddleClickAction: Schema.Struct<{
|
|
|
573
625
|
readonly coordinate: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
574
626
|
}>;
|
|
575
627
|
/**
|
|
576
|
-
*
|
|
628
|
+
* Computer-use action payload for performing a middle click, optionally at a specific coordinate.
|
|
629
|
+
*
|
|
577
630
|
* @category Computer Use
|
|
631
|
+
* @since 4.0.0
|
|
578
632
|
*/
|
|
579
633
|
export type ComputerUseMiddleClickAction = typeof ComputerUseMiddleClickAction.Type;
|
|
580
634
|
/**
|
|
581
635
|
* Perform a right click.
|
|
582
636
|
*
|
|
583
|
-
* @since 1.0.0
|
|
584
637
|
* @category Computer Use
|
|
638
|
+
* @since 4.0.0
|
|
585
639
|
*/
|
|
586
640
|
export declare const ComputerUseRightClickAction: Schema.Struct<{
|
|
587
641
|
readonly action: Schema.Literal<"right_click">;
|
|
@@ -592,15 +646,17 @@ export declare const ComputerUseRightClickAction: Schema.Struct<{
|
|
|
592
646
|
readonly coordinate: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
593
647
|
}>;
|
|
594
648
|
/**
|
|
595
|
-
*
|
|
649
|
+
* Computer-use action payload for performing a right click, optionally at a specific coordinate.
|
|
650
|
+
*
|
|
596
651
|
* @category Computer Use
|
|
652
|
+
* @since 4.0.0
|
|
597
653
|
*/
|
|
598
654
|
export type ComputerUseRightClickAction = typeof ComputerUseRightClickAction.Type;
|
|
599
655
|
/**
|
|
600
656
|
* Scroll a given amount in a specified direction.
|
|
601
657
|
*
|
|
602
|
-
* @since 1.0.0
|
|
603
658
|
* @category Computer Use
|
|
659
|
+
* @since 4.0.0
|
|
604
660
|
*/
|
|
605
661
|
export declare const ComputerUseScrollAction: Schema.Struct<{
|
|
606
662
|
readonly action: Schema.Literal<"scroll">;
|
|
@@ -619,15 +675,17 @@ export declare const ComputerUseScrollAction: Schema.Struct<{
|
|
|
619
675
|
readonly scroll_amount: Schema.Number;
|
|
620
676
|
}>;
|
|
621
677
|
/**
|
|
622
|
-
*
|
|
678
|
+
* Computer-use action payload for scrolling by a specified amount in a specified direction, optionally from a coordinate.
|
|
679
|
+
*
|
|
623
680
|
* @category Computer Use
|
|
681
|
+
* @since 4.0.0
|
|
624
682
|
*/
|
|
625
683
|
export type ComputerUseScrollAction = typeof ComputerUseScrollAction.Type;
|
|
626
684
|
/**
|
|
627
685
|
* Perform a triple click.
|
|
628
686
|
*
|
|
629
|
-
* @since 1.0.0
|
|
630
687
|
* @category Computer Use
|
|
688
|
+
* @since 4.0.0
|
|
631
689
|
*/
|
|
632
690
|
export declare const ComputerUseTripleClickAction: Schema.Struct<{
|
|
633
691
|
readonly action: Schema.Literal<"triple_click">;
|
|
@@ -638,15 +696,17 @@ export declare const ComputerUseTripleClickAction: Schema.Struct<{
|
|
|
638
696
|
readonly coordinate: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
639
697
|
}>;
|
|
640
698
|
/**
|
|
641
|
-
*
|
|
699
|
+
* Computer-use action payload for performing a triple click, optionally at a specific coordinate.
|
|
700
|
+
*
|
|
642
701
|
* @category Computer Use
|
|
702
|
+
* @since 4.0.0
|
|
643
703
|
*/
|
|
644
704
|
export type ComputerUseTripleClickAction = typeof ComputerUseTripleClickAction.Type;
|
|
645
705
|
/**
|
|
646
706
|
* Pause between performing actions.
|
|
647
707
|
*
|
|
648
|
-
* @since 1.0.0
|
|
649
708
|
* @category Computer Use
|
|
709
|
+
* @since 4.0.0
|
|
650
710
|
*/
|
|
651
711
|
export declare const ComputerUseWaitAction: Schema.Struct<{
|
|
652
712
|
readonly action: Schema.Literal<"wait">;
|
|
@@ -656,17 +716,21 @@ export declare const ComputerUseWaitAction: Schema.Struct<{
|
|
|
656
716
|
readonly duration: Schema.Number;
|
|
657
717
|
}>;
|
|
658
718
|
/**
|
|
659
|
-
*
|
|
719
|
+
* Computer-use action payload for pausing for a specified duration.
|
|
720
|
+
*
|
|
660
721
|
* @category Computer Use
|
|
722
|
+
* @since 4.0.0
|
|
661
723
|
*/
|
|
662
724
|
export type ComputerUseWaitAction = typeof ComputerUseWaitAction.Type;
|
|
663
725
|
/**
|
|
664
726
|
* Zoom into a specific region of the screen at full resolution.
|
|
665
727
|
*
|
|
728
|
+
* **Details**
|
|
729
|
+
*
|
|
666
730
|
* Requires `enableZoom: true` in the tool definition.
|
|
667
731
|
*
|
|
668
|
-
* @since 1.0.0
|
|
669
732
|
* @category Computer Use
|
|
733
|
+
* @since 4.0.0
|
|
670
734
|
*/
|
|
671
735
|
export declare const ComputerUseZoomAction: Schema.Struct<{
|
|
672
736
|
readonly action: Schema.Literal<"zoom">;
|
|
@@ -677,19 +741,26 @@ export declare const ComputerUseZoomAction: Schema.Struct<{
|
|
|
677
741
|
readonly region: Schema.Tuple<readonly [Schema.Number, Schema.Number, Schema.Number, Schema.Number]>;
|
|
678
742
|
}>;
|
|
679
743
|
/**
|
|
680
|
-
*
|
|
744
|
+
* Computer-use action payload for zooming into a specific screen region.
|
|
745
|
+
*
|
|
746
|
+
* **Details**
|
|
747
|
+
*
|
|
748
|
+
* The enclosing computer-use tool must be configured with `enableZoom: true`.
|
|
749
|
+
*
|
|
681
750
|
* @category Computer Use
|
|
751
|
+
* @since 4.0.0
|
|
682
752
|
*/
|
|
683
753
|
export type ComputerUseZoomAction = typeof ComputerUseZoomAction.Type;
|
|
684
754
|
/**
|
|
685
755
|
* Computer use tool for Claude 3.5 Sonnet v2 (deprecated).
|
|
686
756
|
*
|
|
687
|
-
*
|
|
757
|
+
* **Details**
|
|
688
758
|
*
|
|
759
|
+
* Requires the "computer-use-2024-10-22" beta header.
|
|
689
760
|
* Basic actions only: screenshot, left_click, type, key, mouse_move.
|
|
690
761
|
*
|
|
691
|
-
* @since 1.0.0
|
|
692
762
|
* @category Computer Use
|
|
763
|
+
* @since 4.0.0
|
|
693
764
|
*/
|
|
694
765
|
export declare const ComputerUse_20241022: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
695
766
|
readonly displayWidthPx: number;
|
|
@@ -748,14 +819,15 @@ export declare const ComputerUse_20241022: <Mode extends Tool.FailureMode | unde
|
|
|
748
819
|
/**
|
|
749
820
|
* Computer use tool for Claude 4 models and Claude Sonnet 3.7.
|
|
750
821
|
*
|
|
751
|
-
*
|
|
822
|
+
* **Details**
|
|
752
823
|
*
|
|
824
|
+
* Requires the "computer-use-2025-01-24" beta header.
|
|
753
825
|
* Includes basic actions plus enhanced actions: scroll, left_click_drag,
|
|
754
826
|
* right_click, middle_click, double_click, triple_click, left_mouse_down,
|
|
755
827
|
* left_mouse_up, hold_key, wait.
|
|
756
828
|
*
|
|
757
|
-
* @since 1.0.0
|
|
758
829
|
* @category Computer Use
|
|
830
|
+
* @since 4.0.0
|
|
759
831
|
*/
|
|
760
832
|
export declare const ComputerUse_20250124: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
761
833
|
readonly displayWidthPx: number;
|
|
@@ -897,19 +969,20 @@ export declare const ComputerUse_20250124: <Mode extends Tool.FailureMode | unde
|
|
|
897
969
|
/**
|
|
898
970
|
* Computer use tool for Claude Opus 4.5 only.
|
|
899
971
|
*
|
|
900
|
-
*
|
|
972
|
+
* **Details**
|
|
901
973
|
*
|
|
974
|
+
* Requires the "computer-use-2025-11-24" beta header.
|
|
902
975
|
* Includes all actions from computer_20250124 plus the zoom action for
|
|
903
976
|
* detailed screen region inspection. Requires `enableZoom: true` in args.
|
|
904
977
|
*
|
|
905
|
-
* @since 1.0.0
|
|
906
978
|
* @category Computer Use
|
|
979
|
+
* @since 4.0.0
|
|
907
980
|
*/
|
|
908
981
|
export declare const ComputerUse_20251124: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
909
982
|
readonly displayWidthPx: number;
|
|
910
983
|
readonly displayHeightPx: number;
|
|
911
|
-
readonly displayNumber?: number | undefined;
|
|
912
984
|
readonly enableZoom?: boolean | undefined;
|
|
985
|
+
readonly displayNumber?: number | undefined;
|
|
913
986
|
readonly failureMode?: Mode | undefined;
|
|
914
987
|
}) => Tool.ProviderDefined<"anthropic.computer_20251124", "AnthropicComputerUse", {
|
|
915
988
|
readonly args: Schema.Struct<{
|
|
@@ -1054,25 +1127,28 @@ export declare const ComputerUse_20251124: <Mode extends Tool.FailureMode | unde
|
|
|
1054
1127
|
/**
|
|
1055
1128
|
* A `[start, end]` line range for viewing file contents.
|
|
1056
1129
|
*
|
|
1057
|
-
*
|
|
1130
|
+
* **Details**
|
|
1058
1131
|
*
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1132
|
+
* Lines are 1-indexed. Use -1 for end to read to the end of the file. For
|
|
1133
|
+
* example, `[1, 50]` views lines 1-50 and `[100, -1]` views from line 100 to
|
|
1134
|
+
* the end of the file.
|
|
1061
1135
|
*
|
|
1062
|
-
* @since 1.0.0
|
|
1063
1136
|
* @category Memory
|
|
1137
|
+
* @since 4.0.0
|
|
1064
1138
|
*/
|
|
1065
1139
|
export declare const ViewRange: Schema.Tuple<readonly [Schema.Number, Schema.Number]>;
|
|
1066
1140
|
/**
|
|
1067
|
-
*
|
|
1141
|
+
* A `[start, end]` 1-indexed line range for viewing file contents, using `-1` as the end value to read through the end of the file.
|
|
1142
|
+
*
|
|
1068
1143
|
* @category Memory
|
|
1144
|
+
* @since 4.0.0
|
|
1069
1145
|
*/
|
|
1070
1146
|
export type ViewRange = typeof ViewRange.Type;
|
|
1071
1147
|
/**
|
|
1072
1148
|
* Creates a new file.
|
|
1073
1149
|
*
|
|
1074
|
-
* @since 1.0.0
|
|
1075
1150
|
* @category Memory
|
|
1151
|
+
* @since 4.0.0
|
|
1076
1152
|
*/
|
|
1077
1153
|
export declare const MemoryCreateCommand: Schema.Struct<{
|
|
1078
1154
|
readonly command: Schema.Literal<"create">;
|
|
@@ -1082,15 +1158,17 @@ export declare const MemoryCreateCommand: Schema.Struct<{
|
|
|
1082
1158
|
readonly path: Schema.String;
|
|
1083
1159
|
}>;
|
|
1084
1160
|
/**
|
|
1085
|
-
*
|
|
1161
|
+
* Memory tool command payload for creating a new file at a path.
|
|
1162
|
+
*
|
|
1086
1163
|
* @category Memory
|
|
1164
|
+
* @since 4.0.0
|
|
1087
1165
|
*/
|
|
1088
1166
|
export type MemoryCreateCommand = typeof MemoryCreateCommand.Type;
|
|
1089
1167
|
/**
|
|
1090
1168
|
* Delete a file or directory.
|
|
1091
1169
|
*
|
|
1092
|
-
* @since 1.0.0
|
|
1093
1170
|
* @category Memory
|
|
1171
|
+
* @since 4.0.0
|
|
1094
1172
|
*/
|
|
1095
1173
|
export declare const MemoryDeleteCommand: Schema.Struct<{
|
|
1096
1174
|
readonly command: Schema.Literal<"delete">;
|
|
@@ -1100,15 +1178,17 @@ export declare const MemoryDeleteCommand: Schema.Struct<{
|
|
|
1100
1178
|
readonly path: Schema.String;
|
|
1101
1179
|
}>;
|
|
1102
1180
|
/**
|
|
1103
|
-
*
|
|
1181
|
+
* Memory tool command payload for deleting a file or directory at a path.
|
|
1182
|
+
*
|
|
1104
1183
|
* @category Memory
|
|
1184
|
+
* @since 4.0.0
|
|
1105
1185
|
*/
|
|
1106
1186
|
export type MemoryDeleteCommand = typeof MemoryDeleteCommand.Type;
|
|
1107
1187
|
/**
|
|
1108
1188
|
* Insert text at a specific line.
|
|
1109
1189
|
*
|
|
1110
|
-
* @since 1.0.0
|
|
1111
1190
|
* @category Memory
|
|
1191
|
+
* @since 4.0.0
|
|
1112
1192
|
*/
|
|
1113
1193
|
export declare const MemoryInsertCommand: Schema.Struct<{
|
|
1114
1194
|
readonly command: Schema.Literal<"insert">;
|
|
@@ -1126,15 +1206,17 @@ export declare const MemoryInsertCommand: Schema.Struct<{
|
|
|
1126
1206
|
readonly insert_text: Schema.String;
|
|
1127
1207
|
}>;
|
|
1128
1208
|
/**
|
|
1129
|
-
*
|
|
1209
|
+
* Memory tool command payload for inserting text at a specific line in a file.
|
|
1210
|
+
*
|
|
1130
1211
|
* @category Memory
|
|
1212
|
+
* @since 4.0.0
|
|
1131
1213
|
*/
|
|
1132
1214
|
export type MemoryInsertCommand = typeof MemoryInsertCommand.Type;
|
|
1133
1215
|
/**
|
|
1134
1216
|
* Rename or move a file or directory.
|
|
1135
1217
|
*
|
|
1136
|
-
* @since 1.0.0
|
|
1137
1218
|
* @category Memory
|
|
1219
|
+
* @since 4.0.0
|
|
1138
1220
|
*/
|
|
1139
1221
|
export declare const MemoryRenameCommand: Schema.Struct<{
|
|
1140
1222
|
readonly command: Schema.Literal<"rename">;
|
|
@@ -1148,15 +1230,17 @@ export declare const MemoryRenameCommand: Schema.Struct<{
|
|
|
1148
1230
|
readonly new_path: Schema.String;
|
|
1149
1231
|
}>;
|
|
1150
1232
|
/**
|
|
1151
|
-
*
|
|
1233
|
+
* Memory tool command payload for renaming or moving a file or directory.
|
|
1234
|
+
*
|
|
1152
1235
|
* @category Memory
|
|
1236
|
+
* @since 4.0.0
|
|
1153
1237
|
*/
|
|
1154
1238
|
export type MemoryRenameCommand = typeof MemoryRenameCommand.Type;
|
|
1155
1239
|
/**
|
|
1156
1240
|
* Replace text in a file.
|
|
1157
1241
|
*
|
|
1158
|
-
* @since 1.0.0
|
|
1159
1242
|
* @category Memory
|
|
1243
|
+
* @since 4.0.0
|
|
1160
1244
|
*/
|
|
1161
1245
|
export declare const MemoryStrReplaceCommand: Schema.Struct<{
|
|
1162
1246
|
readonly command: Schema.Literal<"str_replace">;
|
|
@@ -1174,15 +1258,17 @@ export declare const MemoryStrReplaceCommand: Schema.Struct<{
|
|
|
1174
1258
|
readonly new_str: Schema.String;
|
|
1175
1259
|
}>;
|
|
1176
1260
|
/**
|
|
1177
|
-
*
|
|
1261
|
+
* Memory tool command payload for replacing text in a file.
|
|
1262
|
+
*
|
|
1178
1263
|
* @category Memory
|
|
1264
|
+
* @since 4.0.0
|
|
1179
1265
|
*/
|
|
1180
1266
|
export type MemoryStrReplaceCommand = typeof MemoryStrReplaceCommand.Type;
|
|
1181
1267
|
/**
|
|
1182
1268
|
* Shows directory contents or file contents with optional line ranges.
|
|
1183
1269
|
*
|
|
1184
|
-
* @since 1.0.0
|
|
1185
1270
|
* @category Memory
|
|
1271
|
+
* @since 4.0.0
|
|
1186
1272
|
*/
|
|
1187
1273
|
export declare const MemoryViewCommand: Schema.Struct<{
|
|
1188
1274
|
readonly command: Schema.Literal<"view">;
|
|
@@ -1196,18 +1282,22 @@ export declare const MemoryViewCommand: Schema.Struct<{
|
|
|
1196
1282
|
readonly view_range: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
1197
1283
|
}>;
|
|
1198
1284
|
/**
|
|
1199
|
-
*
|
|
1285
|
+
* Memory tool command payload for viewing a file or directory, optionally with a file line range.
|
|
1286
|
+
*
|
|
1200
1287
|
* @category Memory
|
|
1288
|
+
* @since 4.0.0
|
|
1201
1289
|
*/
|
|
1202
1290
|
export type MemoryViewCommand = typeof MemoryViewCommand.Type;
|
|
1203
1291
|
/**
|
|
1204
1292
|
* Memory tool for persistent file operations across conversations.
|
|
1205
1293
|
*
|
|
1294
|
+
* **Details**
|
|
1295
|
+
*
|
|
1206
1296
|
* Provides commands for creating, viewing, editing, renaming, and deleting
|
|
1207
1297
|
* files within the model's memory space.
|
|
1208
1298
|
*
|
|
1209
|
-
* @since 1.0.0
|
|
1210
1299
|
* @category Memory
|
|
1300
|
+
* @since 4.0.0
|
|
1211
1301
|
*/
|
|
1212
1302
|
export declare const Memory_20250818: <Mode extends Tool.FailureMode | undefined = undefined>(args: void) => Tool.ProviderDefined<"anthropic.memory_20250818", "AnthropicMemory", {
|
|
1213
1303
|
readonly args: Schema.Void;
|
|
@@ -1279,11 +1369,13 @@ export declare const Memory_20250818: <Mode extends Tool.FailureMode | undefined
|
|
|
1279
1369
|
/**
|
|
1280
1370
|
* View the contents of a file or list directory contents.
|
|
1281
1371
|
*
|
|
1282
|
-
*
|
|
1283
|
-
*
|
|
1372
|
+
* **Details**
|
|
1373
|
+
*
|
|
1374
|
+
* When used on a file, returns the file contents, optionally limited to a line
|
|
1375
|
+
* range. When used on a directory, lists all files and subdirectories.
|
|
1284
1376
|
*
|
|
1285
|
-
* @since 1.0.0
|
|
1286
1377
|
* @category Text Editor
|
|
1378
|
+
* @since 4.0.0
|
|
1287
1379
|
*/
|
|
1288
1380
|
export declare const TextEditorViewCommand: Schema.Struct<{
|
|
1289
1381
|
readonly command: Schema.Literal<"view">;
|
|
@@ -1298,17 +1390,21 @@ export declare const TextEditorViewCommand: Schema.Struct<{
|
|
|
1298
1390
|
readonly view_range: Schema.optional<Schema.Tuple<readonly [Schema.Number, Schema.Number]>>;
|
|
1299
1391
|
}>;
|
|
1300
1392
|
/**
|
|
1301
|
-
*
|
|
1393
|
+
* Text editor command payload for viewing file contents or listing directory contents.
|
|
1394
|
+
*
|
|
1302
1395
|
* @category Text Editor
|
|
1396
|
+
* @since 4.0.0
|
|
1303
1397
|
*/
|
|
1304
1398
|
export type TextEditorViewCommand = typeof TextEditorViewCommand.Type;
|
|
1305
1399
|
/**
|
|
1306
1400
|
* Create a new file with specified content.
|
|
1307
1401
|
*
|
|
1308
|
-
*
|
|
1402
|
+
* **Gotchas**
|
|
1403
|
+
*
|
|
1404
|
+
* Fails if the file already exists. Parent directories must exist.
|
|
1309
1405
|
*
|
|
1310
|
-
* @since 1.0.0
|
|
1311
1406
|
* @category Text Editor
|
|
1407
|
+
* @since 4.0.0
|
|
1312
1408
|
*/
|
|
1313
1409
|
export declare const TextEditorCreateCommand: Schema.Struct<{
|
|
1314
1410
|
readonly command: Schema.Literal<"create">;
|
|
@@ -1322,18 +1418,26 @@ export declare const TextEditorCreateCommand: Schema.Struct<{
|
|
|
1322
1418
|
readonly file_text: Schema.String;
|
|
1323
1419
|
}>;
|
|
1324
1420
|
/**
|
|
1325
|
-
*
|
|
1421
|
+
* Text editor command payload for creating a new file with the specified content.
|
|
1422
|
+
*
|
|
1423
|
+
* **Gotchas**
|
|
1424
|
+
*
|
|
1425
|
+
* The command fails if the file already exists or if parent directories are missing.
|
|
1426
|
+
*
|
|
1326
1427
|
* @category Text Editor
|
|
1428
|
+
* @since 4.0.0
|
|
1327
1429
|
*/
|
|
1328
1430
|
export type TextEditorCreateCommand = typeof TextEditorCreateCommand.Type;
|
|
1329
1431
|
/**
|
|
1330
1432
|
* Replace a specific string in a file with a new string.
|
|
1331
1433
|
*
|
|
1434
|
+
* **Gotchas**
|
|
1435
|
+
*
|
|
1332
1436
|
* The `old_str` must match exactly (including whitespace and indentation)
|
|
1333
1437
|
* and must be unique in the file.
|
|
1334
1438
|
*
|
|
1335
|
-
* @since 1.0.0
|
|
1336
1439
|
* @category Text Editor
|
|
1440
|
+
* @since 4.0.0
|
|
1337
1441
|
*/
|
|
1338
1442
|
export declare const TextEditorStrReplaceCommand: Schema.Struct<{
|
|
1339
1443
|
readonly command: Schema.Literal<"str_replace">;
|
|
@@ -1351,17 +1455,21 @@ export declare const TextEditorStrReplaceCommand: Schema.Struct<{
|
|
|
1351
1455
|
readonly new_str: Schema.String;
|
|
1352
1456
|
}>;
|
|
1353
1457
|
/**
|
|
1354
|
-
*
|
|
1458
|
+
* Text editor command payload for replacing one exact, unique string in a file.
|
|
1459
|
+
*
|
|
1355
1460
|
* @category Text Editor
|
|
1461
|
+
* @since 4.0.0
|
|
1356
1462
|
*/
|
|
1357
1463
|
export type TextEditorStrReplaceCommand = typeof TextEditorStrReplaceCommand.Type;
|
|
1358
1464
|
/**
|
|
1359
1465
|
* Insert text at a specific line number in a file.
|
|
1360
1466
|
*
|
|
1467
|
+
* **Details**
|
|
1468
|
+
*
|
|
1361
1469
|
* Inserts the new text AFTER the specified line number.
|
|
1362
1470
|
*
|
|
1363
|
-
* @since 1.0.0
|
|
1364
1471
|
* @category Text Editor
|
|
1472
|
+
* @since 4.0.0
|
|
1365
1473
|
*/
|
|
1366
1474
|
export declare const TextEditorInsertCommand: Schema.Struct<{
|
|
1367
1475
|
readonly command: Schema.Literal<"insert">;
|
|
@@ -1379,20 +1487,26 @@ export declare const TextEditorInsertCommand: Schema.Struct<{
|
|
|
1379
1487
|
readonly new_str: Schema.String;
|
|
1380
1488
|
}>;
|
|
1381
1489
|
/**
|
|
1382
|
-
*
|
|
1490
|
+
* Text editor command payload for inserting text after a specific line number in a file.
|
|
1491
|
+
*
|
|
1383
1492
|
* @category Text Editor
|
|
1493
|
+
* @since 4.0.0
|
|
1384
1494
|
*/
|
|
1385
1495
|
export type TextEditorInsertCommand = typeof TextEditorInsertCommand.Type;
|
|
1386
1496
|
/**
|
|
1387
1497
|
* Undo the last edit made to a file.
|
|
1388
1498
|
*
|
|
1499
|
+
* **Details**
|
|
1500
|
+
*
|
|
1389
1501
|
* Reverts the most recent str_replace, insert, or create operation on the file.
|
|
1390
1502
|
*
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1503
|
+
* **Gotchas**
|
|
1504
|
+
*
|
|
1505
|
+
* This command is available in text_editor_20241022 and text_editor_20250124,
|
|
1506
|
+
* but not in text_editor_20250728 (Claude 4 models).
|
|
1393
1507
|
*
|
|
1394
|
-
* @since 1.0.0
|
|
1395
1508
|
* @category Text Editor
|
|
1509
|
+
* @since 4.0.0
|
|
1396
1510
|
*/
|
|
1397
1511
|
export declare const TextEditorUndoEditCommand: Schema.Struct<{
|
|
1398
1512
|
readonly command: Schema.Literal<"undo_edit">;
|
|
@@ -1402,17 +1516,25 @@ export declare const TextEditorUndoEditCommand: Schema.Struct<{
|
|
|
1402
1516
|
readonly path: Schema.String;
|
|
1403
1517
|
}>;
|
|
1404
1518
|
/**
|
|
1405
|
-
*
|
|
1519
|
+
* Text editor command payload for undoing the most recent edit to a file.
|
|
1520
|
+
*
|
|
1521
|
+
* **Gotchas**
|
|
1522
|
+
*
|
|
1523
|
+
* Available for `text_editor_20241022` and `text_editor_20250124`, but not for Claude 4 text editor versions.
|
|
1524
|
+
*
|
|
1406
1525
|
* @category Text Editor
|
|
1526
|
+
* @since 4.0.0
|
|
1407
1527
|
*/
|
|
1408
1528
|
export type TextEditorUndoEditCommand = typeof TextEditorUndoEditCommand.Type;
|
|
1409
1529
|
/**
|
|
1410
1530
|
* Text editor tool for Claude 3.5 Sonnet (deprecated).
|
|
1411
1531
|
*
|
|
1532
|
+
* **Details**
|
|
1533
|
+
*
|
|
1412
1534
|
* Requires the "computer-use-2024-10-22" beta header.
|
|
1413
1535
|
*
|
|
1414
|
-
* @since 1.0.0
|
|
1415
1536
|
* @category Text Editor
|
|
1537
|
+
* @since 4.0.0
|
|
1416
1538
|
*/
|
|
1417
1539
|
export declare const TextEditor_20241022: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
1418
1540
|
readonly failureMode?: Mode | undefined;
|
|
@@ -1481,8 +1603,12 @@ export declare const TextEditor_20241022: <Mode extends Tool.FailureMode | undef
|
|
|
1481
1603
|
/**
|
|
1482
1604
|
* Text editor tool for Claude Sonnet 3.7 (deprecated model).
|
|
1483
1605
|
*
|
|
1484
|
-
*
|
|
1606
|
+
* **Details**
|
|
1607
|
+
*
|
|
1608
|
+
* Requires the "computer-use-2025-01-24" beta header.
|
|
1609
|
+
*
|
|
1485
1610
|
* @category Text Editor
|
|
1611
|
+
* @since 4.0.0
|
|
1486
1612
|
*/
|
|
1487
1613
|
export declare const TextEditor_20250124: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
1488
1614
|
readonly failureMode?: Mode | undefined;
|
|
@@ -1549,12 +1675,18 @@ export declare const TextEditor_20250124: <Mode extends Tool.FailureMode | undef
|
|
|
1549
1675
|
readonly failureMode: Mode extends undefined ? "error" : Mode;
|
|
1550
1676
|
}, true>;
|
|
1551
1677
|
/**
|
|
1552
|
-
* Text editor tool for Claude 4 models
|
|
1678
|
+
* Text editor tool for Claude 4 models using Anthropic's `str_replace_based_edit_tool`.
|
|
1553
1679
|
*
|
|
1554
|
-
*
|
|
1680
|
+
* **Details**
|
|
1681
|
+
*
|
|
1682
|
+
* Requires the "computer-use-2025-01-24" beta header.
|
|
1683
|
+
*
|
|
1684
|
+
* **Gotchas**
|
|
1685
|
+
*
|
|
1686
|
+
* This version does not support the `undo_edit` command.
|
|
1555
1687
|
*
|
|
1556
|
-
* @since 1.0.0
|
|
1557
1688
|
* @category Text Editor
|
|
1689
|
+
* @since 4.0.0
|
|
1558
1690
|
*/
|
|
1559
1691
|
export declare const TextEditor_20250429: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
1560
1692
|
readonly max_characters?: number | undefined;
|
|
@@ -1624,10 +1756,12 @@ export declare const TextEditor_20250429: <Mode extends Tool.FailureMode | undef
|
|
|
1624
1756
|
/**
|
|
1625
1757
|
* Text editor tool for Claude 4 models.
|
|
1626
1758
|
*
|
|
1627
|
-
*
|
|
1759
|
+
* **Gotchas**
|
|
1760
|
+
*
|
|
1761
|
+
* This version does not support the `undo_edit` command.
|
|
1628
1762
|
*
|
|
1629
|
-
* @since 1.0.0
|
|
1630
1763
|
* @category Text Editor
|
|
1764
|
+
* @since 4.0.0
|
|
1631
1765
|
*/
|
|
1632
1766
|
export declare const TextEditor_20250728: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
1633
1767
|
readonly max_characters?: number | undefined;
|
|
@@ -1697,11 +1831,13 @@ export declare const TextEditor_20250728: <Mode extends Tool.FailureMode | undef
|
|
|
1697
1831
|
/**
|
|
1698
1832
|
* User location for localizing search results.
|
|
1699
1833
|
*
|
|
1834
|
+
* **When to use**
|
|
1835
|
+
*
|
|
1700
1836
|
* Providing location helps return more relevant results for location-dependent
|
|
1701
1837
|
* queries like weather, local businesses, events, etc.
|
|
1702
1838
|
*
|
|
1703
|
-
* @since 1.0.0
|
|
1704
1839
|
* @category Web Search
|
|
1840
|
+
* @since 4.0.0
|
|
1705
1841
|
*/
|
|
1706
1842
|
export declare const WebSearchUserLocation: Schema.Struct<{
|
|
1707
1843
|
/**
|
|
@@ -1728,8 +1864,8 @@ export declare const WebSearchUserLocation: Schema.Struct<{
|
|
|
1728
1864
|
/**
|
|
1729
1865
|
* Configuration arguments for the web search tool.
|
|
1730
1866
|
*
|
|
1731
|
-
* @since 1.0.0
|
|
1732
1867
|
* @category Web Search
|
|
1868
|
+
* @since 4.0.0
|
|
1733
1869
|
*/
|
|
1734
1870
|
export declare const WebSearch_20250305_Args: Schema.Struct<{
|
|
1735
1871
|
/**
|
|
@@ -1775,15 +1911,17 @@ export declare const WebSearch_20250305_Args: Schema.Struct<{
|
|
|
1775
1911
|
}>>;
|
|
1776
1912
|
}>;
|
|
1777
1913
|
/**
|
|
1778
|
-
*
|
|
1914
|
+
* Configuration arguments for the Anthropic web search tool, including usage limits, domain filters, and optional user location.
|
|
1915
|
+
*
|
|
1779
1916
|
* @category Web Search
|
|
1917
|
+
* @since 4.0.0
|
|
1780
1918
|
*/
|
|
1781
1919
|
export type WebSearch_20250305_Args = typeof WebSearch_20250305_Args.Type;
|
|
1782
1920
|
/**
|
|
1783
1921
|
* Input parameters for a web search.
|
|
1784
1922
|
*
|
|
1785
|
-
* @since 1.0.0
|
|
1786
1923
|
* @category Web Search
|
|
1924
|
+
* @since 4.0.0
|
|
1787
1925
|
*/
|
|
1788
1926
|
export declare const WebSearchParameters: Schema.Struct<{
|
|
1789
1927
|
/**
|
|
@@ -1792,20 +1930,27 @@ export declare const WebSearchParameters: Schema.Struct<{
|
|
|
1792
1930
|
readonly query: Schema.String;
|
|
1793
1931
|
}>;
|
|
1794
1932
|
/**
|
|
1795
|
-
*
|
|
1933
|
+
* Type of the parameters Claude supplies when invoking the Anthropic web search tool.
|
|
1934
|
+
*
|
|
1935
|
+
* **Details**
|
|
1936
|
+
*
|
|
1937
|
+
* Contains the generated search query used by `WebSearch_20250305`.
|
|
1938
|
+
*
|
|
1796
1939
|
* @category Web Search
|
|
1940
|
+
* @since 4.0.0
|
|
1797
1941
|
*/
|
|
1798
1942
|
export type WebSearchParameters = typeof WebSearchParameters.Type;
|
|
1799
1943
|
/**
|
|
1800
1944
|
* Web search tool for Claude models.
|
|
1801
1945
|
*
|
|
1946
|
+
* **Details**
|
|
1947
|
+
*
|
|
1802
1948
|
* Enables Claude to search the web for real-time information. This is a
|
|
1803
1949
|
* server-side tool executed by Anthropic's infrastructure.
|
|
1804
|
-
*
|
|
1805
1950
|
* Generally available (no beta header required).
|
|
1806
1951
|
*
|
|
1807
|
-
* @since 1.0.0
|
|
1808
1952
|
* @category Web Search
|
|
1953
|
+
* @since 4.0.0
|
|
1809
1954
|
*/
|
|
1810
1955
|
export declare const WebSearch_20250305: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
1811
1956
|
readonly maxUses?: number | undefined;
|
|
@@ -1814,8 +1959,8 @@ export declare const WebSearch_20250305: <Mode extends Tool.FailureMode | undefi
|
|
|
1814
1959
|
readonly userLocation?: {
|
|
1815
1960
|
readonly type: "approximate";
|
|
1816
1961
|
readonly city?: string | undefined;
|
|
1817
|
-
readonly country?: string | undefined;
|
|
1818
1962
|
readonly region?: string | undefined;
|
|
1963
|
+
readonly country?: string | undefined;
|
|
1819
1964
|
readonly timezone?: string | undefined;
|
|
1820
1965
|
} | undefined;
|
|
1821
1966
|
}) => Tool.ProviderDefined<"anthropic.web_search_20250305", "AnthropicWebSearch", {
|
|
@@ -1884,8 +2029,8 @@ export declare const WebSearch_20250305: <Mode extends Tool.FailureMode | undefi
|
|
|
1884
2029
|
/**
|
|
1885
2030
|
* Citation configuration for web fetch.
|
|
1886
2031
|
*
|
|
1887
|
-
* @since 1.0.0
|
|
1888
2032
|
* @category Web Fetch
|
|
2033
|
+
* @since 4.0.0
|
|
1889
2034
|
*/
|
|
1890
2035
|
export declare const WebFetchCitationsConfig: Schema.Struct<{
|
|
1891
2036
|
/**
|
|
@@ -1894,15 +2039,17 @@ export declare const WebFetchCitationsConfig: Schema.Struct<{
|
|
|
1894
2039
|
readonly enabled: Schema.Boolean;
|
|
1895
2040
|
}>;
|
|
1896
2041
|
/**
|
|
1897
|
-
*
|
|
2042
|
+
* Configuration payload for enabling or disabling citations on web fetch results.
|
|
2043
|
+
*
|
|
1898
2044
|
* @category Web Fetch
|
|
2045
|
+
* @since 4.0.0
|
|
1899
2046
|
*/
|
|
1900
2047
|
export type WebFetchCitationsConfig = typeof WebFetchCitationsConfig.Type;
|
|
1901
2048
|
/**
|
|
1902
2049
|
* Configuration arguments for the web fetch tool.
|
|
1903
2050
|
*
|
|
1904
|
-
* @since 1.0.0
|
|
1905
2051
|
* @category Web Fetch
|
|
2052
|
+
* @since 4.0.0
|
|
1906
2053
|
*/
|
|
1907
2054
|
export declare const WebFetch_20250910_Args: Schema.Struct<{
|
|
1908
2055
|
/**
|
|
@@ -1936,15 +2083,17 @@ export declare const WebFetch_20250910_Args: Schema.Struct<{
|
|
|
1936
2083
|
readonly maxContentTokens: Schema.optional<Schema.Number>;
|
|
1937
2084
|
}>;
|
|
1938
2085
|
/**
|
|
1939
|
-
*
|
|
2086
|
+
* Configuration arguments for the Anthropic web fetch tool, including usage limits, domain filters, citation settings, and token limits.
|
|
2087
|
+
*
|
|
1940
2088
|
* @category Web Fetch
|
|
2089
|
+
* @since 4.0.0
|
|
1941
2090
|
*/
|
|
1942
2091
|
export type WebFetch_20250910_Args = typeof WebFetch_20250910_Args.Type;
|
|
1943
2092
|
/**
|
|
1944
2093
|
* Input parameters for a web fetch.
|
|
1945
2094
|
*
|
|
1946
|
-
* @since 1.0.0
|
|
1947
2095
|
* @category Web Fetch
|
|
2096
|
+
* @since 4.0.0
|
|
1948
2097
|
*/
|
|
1949
2098
|
export declare const WebFetchParameters: Schema.Struct<{
|
|
1950
2099
|
/**
|
|
@@ -1954,28 +2103,31 @@ export declare const WebFetchParameters: Schema.Struct<{
|
|
|
1954
2103
|
readonly url: Schema.String;
|
|
1955
2104
|
}>;
|
|
1956
2105
|
/**
|
|
1957
|
-
*
|
|
2106
|
+
* Type of the parameters Claude supplies when invoking the Anthropic web fetch tool.
|
|
2107
|
+
*
|
|
1958
2108
|
* @category Web Fetch
|
|
2109
|
+
* @since 4.0.0
|
|
1959
2110
|
*/
|
|
1960
2111
|
export type WebFetchParameters = typeof WebFetchParameters.Type;
|
|
1961
2112
|
/**
|
|
1962
2113
|
* Web fetch tool for Claude models.
|
|
1963
2114
|
*
|
|
2115
|
+
* **Details**
|
|
2116
|
+
*
|
|
1964
2117
|
* Allows Claude to retrieve full content from web pages and PDF documents.
|
|
1965
2118
|
* This is a server-side tool executed by Anthropic's infrastructure.
|
|
1966
|
-
*
|
|
1967
2119
|
* Requires the "web-fetch-2025-09-10" beta header.
|
|
1968
2120
|
*
|
|
1969
|
-
* @since 1.0.0
|
|
1970
2121
|
* @category Web Fetch
|
|
2122
|
+
* @since 4.0.0
|
|
1971
2123
|
*/
|
|
1972
2124
|
export declare const WebFetch_20250910: <Mode extends Tool.FailureMode | undefined = undefined>(args: {
|
|
1973
|
-
readonly citations?: {
|
|
1974
|
-
readonly enabled: boolean;
|
|
1975
|
-
} | undefined;
|
|
1976
2125
|
readonly maxUses?: number | undefined;
|
|
1977
2126
|
readonly allowedDomains?: readonly string[] | undefined;
|
|
1978
2127
|
readonly blockedDomains?: readonly string[] | undefined;
|
|
2128
|
+
readonly citations?: {
|
|
2129
|
+
readonly enabled: boolean;
|
|
2130
|
+
} | undefined;
|
|
1979
2131
|
readonly maxContentTokens?: number | undefined;
|
|
1980
2132
|
}) => Tool.ProviderDefined<"anthropic.web_fetch_20250910", "AnthropicWebFetch", {
|
|
1981
2133
|
readonly args: Schema.Struct<{
|
|
@@ -2046,11 +2198,13 @@ export declare const WebFetch_20250910: <Mode extends Tool.FailureMode | undefin
|
|
|
2046
2198
|
/**
|
|
2047
2199
|
* Input parameters for regex-based tool search.
|
|
2048
2200
|
*
|
|
2201
|
+
* **Details**
|
|
2202
|
+
*
|
|
2049
2203
|
* Claude constructs regex patterns using Python's `re.search()` syntax.
|
|
2050
2204
|
* Maximum query length: 200 characters.
|
|
2051
2205
|
*
|
|
2052
|
-
* @since 1.0.0
|
|
2053
2206
|
* @category Tool Search
|
|
2207
|
+
* @since 4.0.0
|
|
2054
2208
|
*/
|
|
2055
2209
|
export declare const ToolSearchRegexParameters: Schema.Struct<{
|
|
2056
2210
|
/**
|
|
@@ -2059,15 +2213,17 @@ export declare const ToolSearchRegexParameters: Schema.Struct<{
|
|
|
2059
2213
|
readonly query: Schema.String;
|
|
2060
2214
|
}>;
|
|
2061
2215
|
/**
|
|
2062
|
-
*
|
|
2216
|
+
* Type of the parameters Claude supplies when invoking regex-based Anthropic tool search.
|
|
2217
|
+
*
|
|
2063
2218
|
* @category Tool Search
|
|
2219
|
+
* @since 4.0.0
|
|
2064
2220
|
*/
|
|
2065
2221
|
export type ToolSearchRegexParameters = typeof ToolSearchRegexParameters.Type;
|
|
2066
2222
|
/**
|
|
2067
2223
|
* Input parameters for BM25/natural language tool search.
|
|
2068
2224
|
*
|
|
2069
|
-
* @since 1.0.0
|
|
2070
2225
|
* @category Tool Search
|
|
2226
|
+
* @since 4.0.0
|
|
2071
2227
|
*/
|
|
2072
2228
|
export declare const ToolSearchBM25Parameters: Schema.Struct<{
|
|
2073
2229
|
/**
|
|
@@ -2076,21 +2232,24 @@ export declare const ToolSearchBM25Parameters: Schema.Struct<{
|
|
|
2076
2232
|
readonly query: Schema.String;
|
|
2077
2233
|
}>;
|
|
2078
2234
|
/**
|
|
2079
|
-
*
|
|
2235
|
+
* Type of the parameters Claude supplies when invoking BM25 natural-language Anthropic tool search.
|
|
2236
|
+
*
|
|
2080
2237
|
* @category Tool Search
|
|
2238
|
+
* @since 4.0.0
|
|
2081
2239
|
*/
|
|
2082
2240
|
export type ToolSearchBM25Parameters = typeof ToolSearchBM25Parameters.Type;
|
|
2083
2241
|
/**
|
|
2084
2242
|
* Regex-based tool search for Claude models.
|
|
2085
2243
|
*
|
|
2244
|
+
* **Details**
|
|
2245
|
+
*
|
|
2086
2246
|
* Claude constructs regex patterns using Python's `re.search()` syntax to
|
|
2087
2247
|
* find tools. The regex is matched against tool names, descriptions,
|
|
2088
2248
|
* argument names, and argument descriptions.
|
|
2089
|
-
*
|
|
2090
2249
|
* Requires the "advanced-tool-use-2025-11-20" beta header.
|
|
2091
2250
|
*
|
|
2092
|
-
* @since 1.0.0
|
|
2093
2251
|
* @category Tool Search
|
|
2252
|
+
* @since 4.0.0
|
|
2094
2253
|
*/
|
|
2095
2254
|
export declare const ToolSearchRegex_20251119: <Mode extends Tool.FailureMode | undefined = undefined>(args: void) => Tool.ProviderDefined<"anthropic.tool_search_tool_regex_20251119", "AnthropicToolSearchRegex", {
|
|
2096
2255
|
readonly args: Schema.Void;
|
|
@@ -2118,14 +2277,15 @@ export declare const ToolSearchRegex_20251119: <Mode extends Tool.FailureMode |
|
|
|
2118
2277
|
/**
|
|
2119
2278
|
* BM25/natural language tool search for Claude models.
|
|
2120
2279
|
*
|
|
2280
|
+
* **Details**
|
|
2281
|
+
*
|
|
2121
2282
|
* Claude uses natural language queries to search for tools using the
|
|
2122
2283
|
* BM25 algorithm. The search is performed against tool names, descriptions,
|
|
2123
2284
|
* argument names, and argument descriptions.
|
|
2124
|
-
*
|
|
2125
2285
|
* Requires the "advanced-tool-use-2025-11-20" beta header.
|
|
2126
2286
|
*
|
|
2127
|
-
* @since 1.0.0
|
|
2128
2287
|
* @category Tool Search
|
|
2288
|
+
* @since 4.0.0
|
|
2129
2289
|
*/
|
|
2130
2290
|
export declare const ToolSearchBM25_20251119: <Mode extends Tool.FailureMode | undefined = undefined>(args: void) => Tool.ProviderDefined<"anthropic.tool_search_tool_bm25_20251119", "AnthropicToolSearchBM25", {
|
|
2131
2291
|
readonly args: Schema.Void;
|