The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 190
190190
191191 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=http).
192192
193 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
193 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter.
194194
195195 There is a limit of 100,000 messages in a single request.
196196
197 - `content: string or array of BetaContentBlockParam`
198
199 - `string`
200
201 - `array of BetaContentBlockParam`
202
203 - `BetaTextBlockParam object`
204
205 - `type: "text"`
206
207 - `text: string`
208
209 minLength: 1
210
211 - `cache_control: optional BetaCacheControlEphemeral or null`
212
213 Create a cache control breakpoint at this content block.
214
215 - `type: "ephemeral"`
216
217 - `ttl: optional "5m" or "1h"`
218
219 The time-to-live for the cache control breakpoint.
220
221 This may be one the following values:
222
223 - `5m`: 5 minutes
224 - `1h`: 1 hour
225
226 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
227
228 - `"5m"`
229
230 - `"1h"`
231
232 - `citations: optional array of BetaTextCitationParam or null`
233
234 - `BetaCitationCharLocationParam object`
235
236 - `type: "char_location"`
237
238 - `cited_text: string`
239
240 - `document_index: number`
241
242 minimum: 0
243
244 - `document_title: string or null`
245
246 minLength: 1, maxLength: 500
247
248 - `end_char_index: number`
249
250 - `start_char_index: number`
251
252 minimum: 0
253
254 - `BetaCitationPageLocationParam object`
255
256 - `type: "page_location"`
257
258 - `cited_text: string`
259
260 - `document_index: number`
261
262 minimum: 0
263
264 - `document_title: string or null`
265
266 minLength: 1, maxLength: 500
267
268 - `end_page_number: number`
269
270 - `start_page_number: number`
271
272 minimum: 1
273
274 - `BetaCitationContentBlockLocationParam object`
275
276 - `type: "content_block_location"`
277
278 - `cited_text: string`
279
280 The full text of the cited block range, concatenated.
281
282 Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.
283
284 - `document_index: number`
285
286 minimum: 0
287
288 - `document_title: string or null`
289
290 minLength: 1, maxLength: 500
291
292 - `end_block_index: number`
293
294 Exclusive 0-based end index of the cited block range in the source's `content` array.
295
296 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.
297
298 - `start_block_index: number`
299
300 0-based index of the first cited block in the source's `content` array.
301
302 minimum: 0
303
304 - `BetaCitationWebSearchResultLocationParam object`
305
306 - `type: "web_search_result_location"`
307
308 - `cited_text: string`
309
310 - `encrypted_index: string`
311
312 - `title: string or null`
313
314 minLength: 1, maxLength: 512
315
316 - `url: string`
197 - `BetaUserMessageParam object`
198
199 - `content: BetaMessageContentParam`
200
201 - `string`
202
203 - `array of BetaContentBlockParam`
204
205 - `BetaTextBlockParam object`
206
207 - `type: "text"`
208
209 - `text: string`
210
211 minLength: 1
212
213 - `cache_control: optional BetaCacheControlEphemeral or null`
214
215 Create a cache control breakpoint at this content block.
216
217 - `type: "ephemeral"`
218
219 - `ttl: optional "5m" or "1h"`
220
221 The time-to-live for the cache control breakpoint.
222
223 This may be one the following values:
224
225 - `5m`: 5 minutes
226 - `1h`: 1 hour
227
228 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
229
230 - `"5m"`
231
232 - `"1h"`
233
234 - `citations: optional array of BetaTextCitationParam or null`
235
236 - `BetaCitationCharLocationParam object`
237
238 - `type: "char_location"`
239
240 - `cited_text: string`
241
242 - `document_index: number`
243
244 minimum: 0
245
246 - `document_title: string or null`
247
248 minLength: 1, maxLength: 500
249
250 - `end_char_index: number`
251
252 - `start_char_index: number`
253
254 minimum: 0
255
256 - `BetaCitationPageLocationParam object`
257
258 - `type: "page_location"`
259
260 - `cited_text: string`
261
262 - `document_index: number`
263
264 minimum: 0
265
266 - `document_title: string or null`
267
268 minLength: 1, maxLength: 500
269
270 - `end_page_number: number`
271
272 - `start_page_number: number`
273
274 minimum: 1
275
276 - `BetaCitationContentBlockLocationParam object`
277
278 - `type: "content_block_location"`
279
280 - `cited_text: string`
281
282 The full text of the cited block range, concatenated.
283
284 Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.
285
286 - `document_index: number`
287
288 minimum: 0
289
290 - `document_title: string or null`
291
292 minLength: 1, maxLength: 500
293
294 - `end_block_index: number`
295
296 Exclusive 0-based end index of the cited block range in the source's `content` array.
297
298 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.
299
300 - `start_block_index: number`
301
302 0-based index of the first cited block in the source's `content` array.
303
304 minimum: 0
305
306 - `BetaCitationWebSearchResultLocationParam object`
307
308 - `type: "web_search_result_location"`
309
310 - `cited_text: string`
311
312 - `encrypted_index: string`
313
314 - `title: string or null`
315
316 minLength: 1, maxLength: 512
317
318 - `url: string`
319
320 minLength: 1
321
322 - `BetaCitationSearchResultLocationParam object`
323
324 - `type: "search_result_location"`
325
326 - `cited_text: string`
327
328 The full text of the cited block range, concatenated.
329
330 Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.
331
332 - `end_block_index: number`
333
334 Exclusive 0-based end index of the cited block range in the source's `content` array.
335
336 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.
337
338 - `search_result_index: number`
339
340 0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.
341
342 Counted separately from `document_index`; server-side web search results are not included in this count.
343
344 minimum: 0
345
346 - `source: string`
347
348 - `start_block_index: number`
349
350 0-based index of the first cited block in the source's `content` array.
351
352 minimum: 0
353
354 - `title: string or null`
355
356 - `BetaImageBlockParam object`
357
358 - `type: "image"`
359
360 - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`
361
362 - `BetaBase64ImageSource object`
363
364 - `type: "base64"`
365
366 - `data: string`
367
368 format: byte
369
370 - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"`
371
372 - `"image/jpeg"`
373
374 - `"image/png"`
375
376 - `"image/gif"`
377
378 - `"image/webp"`
379
380 - `BetaURLImageSource object`
381
382 - `type: "url"`
383
384 - `url: string`
385
386 - `BetaFileImageSource object`
387
388 - `type: "file"`
389
390 - `file_id: string`
391
392 - `cache_control: optional BetaCacheControlEphemeral or null`
393
394 Create a cache control breakpoint at this content block.
395
396 - `transformations: optional BetaImageTransformationsParam or null`
397
398 Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.
399
400 - `oversized_image: optional "downsize" or "error"`
401
402 What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.
403
404 - `"downsize"`
405
406 - `"error"`
407
408 - `BetaRequestDocumentBlock object`
409
410 - `type: "document"`
411
412 - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`
413
414 - `BetaBase64PDFSource object`
415
416 - `type: "base64"`
417
418 - `data: string`
419
420 format: byte
421
422 - `media_type: "application/pdf"`
423
424 - `BetaPlainTextSource object`
425
426 - `type: "text"`
427
428 - `data: string`
429
430 - `media_type: "text/plain"`
431
432 - `BetaContentBlockSource object`
433
434 - `type: "content"`
435
436 - `content: string or array of BetaContentBlockSourceContent`
437
438 - `string`
439
440 - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent`
441
442 - `BetaTextBlockParam object`
443
444 - `BetaImageBlockParam object`
445
446 - `BetaURLPDFSource object`
447
448 - `type: "url"`
449
450 - `url: string`
451
452 - `BetaFileDocumentSource object`
453
454 - `type: "file"`
455
456 - `file_id: string`
457
458 - `cache_control: optional BetaCacheControlEphemeral or null`
459
460 Create a cache control breakpoint at this content block.
461
462 - `citations: optional BetaCitationsConfigParam or null`
463
464 - `enabled: optional boolean`
465
466 - `context: optional string or null`
467
468 minLength: 1
469
470 - `title: optional string or null`
471
472 minLength: 1, maxLength: 500
473
474 - `BetaSearchResultBlockParam object`
475
476 - `type: "search_result"`
477
478 - `content: array of BetaTextBlockParam`
479
480 - `type: "text"`
481
482 - `text: string`
317483
318484 minLength: 1
319485
320 - `BetaCitationSearchResultLocationParam object`
321
322 - `type: "search_result_location"`
323
324 - `cited_text: string`
325
326 The full text of the cited block range, concatenated.
327
328 Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.
329
330 - `end_block_index: number`
331
332 Exclusive 0-based end index of the cited block range in the source's `content` array.
333
334 Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.
335
336 - `search_result_index: number`
337
338 0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.
339
340 Counted separately from `document_index`; server-side web search results are not included in this count.
341
342 minimum: 0
343
344 - `source: string`
345
346 - `start_block_index: number`
347
348 0-based index of the first cited block in the source's `content` array.
349
350 minimum: 0
351
352 - `title: string or null`
353
354 - `BetaImageBlockParam object`
355
356 - `type: "image"`
357
358 - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`
359
360 - `BetaBase64ImageSource object`
361
362 - `type: "base64"`
363
364 - `data: string`
365
366 format: byte
367
368 - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"`
369
370 - `"image/jpeg"`
371
372 - `"image/png"`
373
374 - `"image/gif"`
375
376 - `"image/webp"`
377
378 - `BetaURLImageSource object`
379
380 - `type: "url"`
381
382 - `url: string`
383
384 - `BetaFileImageSource object`
385
386 - `type: "file"`
387
388 - `file_id: string`
389
390 - `cache_control: optional BetaCacheControlEphemeral or null`
391
392 Create a cache control breakpoint at this content block.
393
394 - `transformations: optional BetaImageTransformationsParam or null`
395
396 Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.
397
398 - `oversized_image: optional "downsize" or "error"`
399
400 What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.
401
402 - `"downsize"`
403
404 - `"error"`
405
406 - `BetaRequestDocumentBlock object`
407
408 - `type: "document"`
409
410 - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`
411
412 - `BetaBase64PDFSource object`
413
414 - `type: "base64"`
415
416 - `data: string`
417
418 format: byte
419
420 - `media_type: "application/pdf"`
421
422 - `BetaPlainTextSource object`
423
424 - `type: "text"`
425
426 - `data: string`
427
428 - `media_type: "text/plain"`
429
430 - `BetaContentBlockSource object`
431
432 - `type: "content"`
433
434 - `content: string or array of BetaContentBlockSourceContent`
435
436 - `string`
437
438 - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent`
439
440 - `BetaTextBlockParam object`
441
442 - `BetaImageBlockParam object`
443
444 - `BetaURLPDFSource object`
445
446 - `type: "url"`
447
448 - `url: string`
449
450 - `BetaFileDocumentSource object`
451
452 - `type: "file"`
453
454 - `file_id: string`
455
456 - `cache_control: optional BetaCacheControlEphemeral or null`
457
458 Create a cache control breakpoint at this content block.
459
460 - `citations: optional BetaCitationsConfigParam or null`
461
462 - `enabled: optional boolean`
463
464 - `context: optional string or null`
465
466 minLength: 1
467
468 - `title: optional string or null`
469
470 minLength: 1, maxLength: 500
471
472 - `BetaSearchResultBlockParam object`
473
474 - `type: "search_result"`
475
476 - `content: array of BetaTextBlockParam`
477
478 - `type: "text"`
479
480 - `text: string`
481
482 minLength: 1
486 - `cache_control: optional BetaCacheControlEphemeral or null`
487
488 Create a cache control breakpoint at this content block.
489
490 - `citations: optional array of BetaTextCitationParam or null`
491
492 - `source: string`
493
494 - `title: string`
483495
484496 - `cache_control: optional BetaCacheControlEphemeral or null`
485497
486498 Create a cache control breakpoint at this content block.
487499
488 - `citations: optional array of BetaTextCitationParam or null`
489
490 - `source: string`
491
492 - `title: string`
493
494 - `cache_control: optional BetaCacheControlEphemeral or null`
495
496 Create a cache control breakpoint at this content block.
497
498 - `citations: optional BetaCitationsConfigParam`
499
500 - `BetaThinkingBlockParam object`
501
502 - `type: "thinking"`
503
504 - `signature: string`
505
506 The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.
507
508 Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.
509
510 - `thinking: string`
511
512 The `thinking` text of this block as returned by the API.
513
514 - `BetaRedactedThinkingBlockParam object`
515
516 - `type: "redacted_thinking"`
517
518 - `data: string`
519
520 The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.
521
522 - `BetaToolUseBlockParam object`
523
524 - `type: "tool_use"`
525
526 - `id: string`
527
528 pattern: ^[a-zA-Z0-9_-]+$
529
530 - `input: map[unknown]`
531
532 - `name: string`
533
534 minLength: 1, maxLength: 200
535
536 - `cache_control: optional BetaCacheControlEphemeral or null`
537
538 Create a cache control breakpoint at this content block.
539
540 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
541
542 - `BetaDirectCaller object`
543
544 Tool invocation directly from the model.
545
546 - `type: "direct"`
547
548 - `BetaServerToolCaller object`
549
550 Tool invocation generated by a server-side tool.
551
552 - `type: "code_execution_20250825"`
553
554 - `tool_id: string`
555
556 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
557
558 - `BetaServerToolCaller20260120 object`
559
560 - `type: "code_execution_20260120"`
561
562 - `tool_id: string`
563
564 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
565
566 - `toolset_name: optional string or null`
567
568 For a toolset member tool_use, the toolset family this member belongs to.
569
570 minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$
571
572 - `BetaToolResultBlockParam object`
573
574 - `type: "tool_result"`
575
576 - `tool_use_id: string`
577
578 pattern: ^[a-zA-Z0-9_-]+$
579
580 - `cache_control: optional BetaCacheControlEphemeral or null`
581
582 Create a cache control breakpoint at this content block.
583
584 - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`
585
586 - `string`
587
588 - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`
589
590 - `BetaTextBlockParam object`
591
592 - `BetaImageBlockParam object`
593
594 - `BetaSearchResultBlockParam object`
595
596 - `BetaRequestDocumentBlock object`
597
598 - `BetaToolReferenceBlockParam object`
599
600 Tool reference block that can be included in tool_result content.
601
602 - `type: "tool_reference"`
603
604 - `tool_name: string`
605
606 minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$
500 - `citations: optional BetaCitationsConfigParam`
501
502 - `BetaThinkingBlockParam object`
503
504 - `type: "thinking"`
505
506 - `signature: string`
507
508 The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.
509
510 Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`.
511
512 - `thinking: string`
513
514 The `thinking` text of this block as returned by the API.
515
516 - `BetaRedactedThinkingBlockParam object`
517
518 - `type: "redacted_thinking"`
519
520 - `data: string`
521
522 The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged.
523
524 - `BetaToolUseBlockParam object`
525
526 - `type: "tool_use"`
527
528 - `id: string`
529
530 pattern: ^[a-zA-Z0-9_-]+$
531
532 - `input: map[unknown]`
533
534 - `name: string`
535
536 minLength: 1, maxLength: 200
537
538 - `cache_control: optional BetaCacheControlEphemeral or null`
539
540 Create a cache control breakpoint at this content block.
541
542 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
543
544 - `BetaDirectCaller object`
545
546 Tool invocation directly from the model.
547
548 - `type: "direct"`
549
550 - `BetaServerToolCaller object`
551
552 Tool invocation generated by a server-side tool.
553
554 - `type: "code_execution_20250825"`
555
556 - `tool_id: string`
557
558 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
559
560 - `BetaServerToolCaller20260120 object`
561
562 - `type: "code_execution_20260120"`
563
564 - `tool_id: string`
565
566 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
567
568 - `toolset_name: optional string or null`
569
570 For a toolset member tool_use, the toolset family this member belongs to.
571
572 minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$
573
574 - `BetaToolResultBlockParam object`
575
576 - `type: "tool_result"`
577
578 - `tool_use_id: string`
579
580 pattern: ^[a-zA-Z0-9_-]+$
581
582 - `cache_control: optional BetaCacheControlEphemeral or null`
583
584 Create a cache control breakpoint at this content block.
585
586 - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`
587
588 - `string`
589
590 - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more`
591
592 - `BetaTextBlockParam object`
593
594 - `BetaImageBlockParam object`
595
596 - `BetaSearchResultBlockParam object`
597
598 - `BetaRequestDocumentBlock object`
599
600 - `BetaToolReferenceBlockParam object`
601
602 Tool reference block that can be included in tool_result content.
603
604 - `type: "tool_reference"`
605
606 - `tool_name: string`
607
608 minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$
609
610 - `cache_control: optional BetaCacheControlEphemeral or null`
611
612 Create a cache control breakpoint at this content block.
613
614 - `BetaBrowserStateBlockParam object`
615
616 The caller's browser state after a browser toolset member call —
617 the full inventory of open tabs, which tab is active, and any side
618 effects (tabs opened, download state changes) the call produced.
619
620 At most one per `tool_result`, only on a non-error result answering a
621 browser toolset member `tool_use`. The server renders the
622 model-visible text from it; the model never sees the raw fields.
623
624 - `type: "browser_state"`
625
626 - `tabs: array of BetaBrowserStateTabEntry`
627
628 All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.
629
630 maxItems: 100
631
632 - `tab_id: string`
633
634 The caller-assigned identifier for this tab, unique within the inventory.
635
636 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
637
638 - `title: string`
639
640 The title of the page the tab is showing. May be empty.
641
642 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
643
644 - `url: string`
645
646 The URL of the page the tab is showing. May be empty.
647
648 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
649
650 - `active: optional boolean`
651
652 Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.
653
654 - `cache_control: optional BetaCacheControlEphemeral or null`
655
656 Create a cache control breakpoint at this content block.
657
658 - `state_changes: optional array of BetaBrowserStateChange or null`
659
660 Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.
661
662 minItems: 1, maxItems: 200
663
664 - `BetaBrowserStateChangeTabOpened object`
665
666 A tab this call's execution opened that remains open at its end —
667 the creation delta of the `tabs` inventory, not an event log.
668
669 Carries only the `tab_id`; the tab's `title` and `url` live on its
670 `tabs` entry, which must include the same `tab_id`. A tab opened
671 during a failed call gets no deferred `tab_opened`; it simply appears
672 in the next result's `tabs` inventory.
673
674 - `type: "tab_opened"`
675
676 - `tab_id: string`
677
678 The `tab_id` of the opened tab, present in `tabs`.
679
680 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
681
682 - `BetaBrowserStateChangeDownloadStarted object`
683
684 A file download that started during this call.
685
686 - `type: "download_started"`
687
688 - `download_id: string`
689
690 The caller-assigned identifier for this download, stable across the state changes reporting it.
691
692 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
693
694 - `url: string`
695
696 The final post-redirect URL the download was served from.
697
698 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
699
700 - `BetaBrowserStateChangeDownloadCompleted object`
701
702 A file download that finished during this call, reported with the
703 same `download_id` as its `download_started` — or without a prior
704 `download_started`, when the download finished during the call that
705 started it (at most one state change per `download_id` per result).
706
707 - `type: "download_completed"`
708
709 - `download_id: string`
710
711 The caller-assigned identifier for this download, stable across the state changes reporting it.
712
713 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
714
715 - `url: string`
716
717 The final post-redirect URL the download was served from.
718
719 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
720
721 - `path: optional string or null`
722
723 Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.
724
725 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
726
727 - `size_bytes: optional number or null`
728
729 The completed download's size.
730
731 minimum: 0
732
733 - `BetaBrowserStateChangeDownloadFailed object`
734
735 A file download that failed — or was cancelled — during this call.
736
737 - `type: "download_failed"`
738
739 - `download_id: string`
740
741 The caller-assigned identifier for this download, stable across the state changes reporting it.
742
743 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
744
745 - `url: string`
746
747 The final post-redirect URL the download was served from.
748
749 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
750
751 - `error: optional string or null`
752
753 The failure or cancellation detail, when known.
754
755 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
756
757 - `is_error: optional boolean`
758
759 - `toolset_name: optional string or null`
760
761 For a toolset member tool_result, the toolset family of the paired tool_use.
762
763 minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$
764
765 - `BetaServerToolUseBlockParam object`
766
767 - `type: "server_tool_use"`
768
769 - `id: string`
770
771 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
772
773 - `input: map[unknown]`
774
775 - `name: "advisor" or "web_search" or "web_fetch" or 5 more`
776
777 - `"advisor"`
778
779 - `"web_search"`
780
781 - `"web_fetch"`
782
783 - `"code_execution"`
784
785 - `"bash_code_execution"`
786
787 - `"text_editor_code_execution"`
788
789 - `"tool_search_tool_regex"`
790
791 - `"tool_search_tool_bm25"`
792
793 - `cache_control: optional BetaCacheControlEphemeral or null`
794
795 Create a cache control breakpoint at this content block.
796
797 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
798
799 - `BetaDirectCaller object`
800
801 Tool invocation directly from the model.
802
803 - `BetaServerToolCaller object`
804
805 Tool invocation generated by a server-side tool.
806
807 - `BetaServerToolCaller20260120 object`
808
809 - `BetaWebSearchToolResultBlockParam object`
810
811 - `type: "web_search_tool_result"`
812
813 - `content: BetaWebSearchToolResultBlockParamContent`
814
815 - `ResultBlock = array of BetaWebSearchResultBlockParam`
816
817 - `type: "web_search_result"`
818
819 - `encrypted_content: string`
820
821 - `title: string`
822
823 - `url: string`
824
825 - `page_age: optional string or null`
826
827 - `BetaWebSearchToolRequestError object`
828
829 - `type: "web_search_tool_result_error"`
830
831 - `error_code: BetaWebSearchToolResultErrorCode`
832
833 - `"invalid_tool_input"`
834
835 - `"unavailable"`
836
837 - `"max_uses_exceeded"`
838
839 - `"too_many_requests"`
840
841 - `"query_too_long"`
842
843 - `"request_too_large"`
844
845 - `tool_use_id: string`
846
847 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
848
849 - `cache_control: optional BetaCacheControlEphemeral or null`
850
851 Create a cache control breakpoint at this content block.
852
853 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
854
855 - `BetaDirectCaller object`
856
857 Tool invocation directly from the model.
858
859 - `BetaServerToolCaller object`
860
861 Tool invocation generated by a server-side tool.
862
863 - `BetaServerToolCaller20260120 object`
864
865 - `BetaWebFetchToolResultBlockParam object`
866
867 - `type: "web_fetch_tool_result"`
868
869 - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam`
870
871 - `BetaWebFetchToolResultErrorBlockParam object`
872
873 - `type: "web_fetch_tool_result_error"`
874
875 - `error_code: BetaWebFetchToolResultErrorCode`
876
877 - `"invalid_tool_input"`
878
879 - `"url_too_long"`
880
881 - `"url_not_allowed"`
882
883 - `"url_not_in_prior_context"`
884
885 - `"url_not_accessible"`
886
887 - `"unsupported_content_type"`
888
889 - `"too_many_requests"`
890
891 - `"max_uses_exceeded"`
892
893 - `"unavailable"`
894
895 - `"content_too_large"`
896
897 - `BetaWebFetchBlockParam object`
898
899 - `type: "web_fetch_result"`
900
901 - `content: BetaRequestDocumentBlock`
902
903 - `url: string`
904
905 Fetched content URL
906
907 - `retrieved_at: optional string or null`
908
909 ISO 8601 timestamp when the content was retrieved
910
911 - `tool_use_id: string`
912
913 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
914
915 - `cache_control: optional BetaCacheControlEphemeral or null`
916
917 Create a cache control breakpoint at this content block.
918
919 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
920
921 - `BetaDirectCaller object`
922
923 Tool invocation directly from the model.
924
925 - `BetaServerToolCaller object`
926
927 Tool invocation generated by a server-side tool.
928
929 - `BetaServerToolCaller20260120 object`
930
931 - `BetaAdvisorToolResultBlockParam object`
932
933 - `type: "advisor_tool_result"`
934
935 - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam`
936
937 - `BetaAdvisorToolResultErrorParam object`
938
939 - `type: "advisor_tool_result_error"`
940
941 - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more`
942
943 - `"max_uses_exceeded"`
944
945 - `"prompt_too_long"`
946
947 - `"too_many_requests"`
948
949 - `"overloaded"`
950
951 - `"unavailable"`
952
953 - `"execution_time_exceeded"`
954
955 - `"model_not_found"`
956
957 - `BetaAdvisorResultBlockParam object`
958
959 - `type: "advisor_result"`
960
961 - `text: string`
962
963 - `stop_reason: optional string or null`
964
965 - `BetaAdvisorRedactedResultBlockParam object`
966
967 - `type: "advisor_redacted_result"`
968
969 - `encrypted_content: string`
970
971 Opaque blob produced by a prior response; must be round-tripped verbatim.
972
973 - `stop_reason: optional string or null`
974
975 - `tool_use_id: string`
976
977 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
978
979 - `cache_control: optional BetaCacheControlEphemeral or null`
980
981 Create a cache control breakpoint at this content block.
982
983 - `BetaCodeExecutionToolResultBlockParam object`
984
985 - `type: "code_execution_tool_result"`
986
987 - `content: BetaCodeExecutionToolResultBlockParamContent`
988
989 - `BetaCodeExecutionToolResultErrorParam object`
990
991 - `type: "code_execution_tool_result_error"`
992
993 - `error_code: BetaCodeExecutionToolResultErrorCode`
994
995 - `"invalid_tool_input"`
996
997 - `"unavailable"`
998
999 - `"too_many_requests"`
1000
1001 - `"execution_time_exceeded"`
1002
1003 - `BetaCodeExecutionResultBlockParam object`
1004
1005 - `type: "code_execution_result"`
1006
1007 - `content: array of BetaCodeExecutionOutputBlockParam`
1008
1009 - `type: "code_execution_output"`
1010
1011 - `file_id: string`
1012
1013 - `return_code: number`
1014
1015 - `stderr: string`
1016
1017 - `stdout: string`
1018
1019 - `BetaEncryptedCodeExecutionResultBlockParam object`
1020
1021 Code execution result with encrypted stdout for PFC + web_search results.
1022
1023 - `type: "encrypted_code_execution_result"`
1024
1025 - `content: array of BetaCodeExecutionOutputBlockParam`
1026
1027 - `type: "code_execution_output"`
1028
1029 - `file_id: string`
1030
1031 - `encrypted_stdout: string`
1032
1033 - `return_code: number`
1034
1035 - `stderr: string`
1036
1037 - `tool_use_id: string`
1038
1039 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1040
1041 - `cache_control: optional BetaCacheControlEphemeral or null`
1042
1043 Create a cache control breakpoint at this content block.
1044
1045 - `BetaBashCodeExecutionToolResultBlockParam object`
1046
1047 - `type: "bash_code_execution_tool_result"`
1048
1049 - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam`
1050
1051 - `BetaBashCodeExecutionToolResultErrorParam object`
1052
1053 - `type: "bash_code_execution_tool_result_error"`
1054
1055 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`
1056
1057 - `"invalid_tool_input"`
1058
1059 - `"unavailable"`
1060
1061 - `"too_many_requests"`
1062
1063 - `"execution_time_exceeded"`
1064
1065 - `"output_file_too_large"`
1066
1067 - `BetaBashCodeExecutionResultBlockParam object`
1068
1069 - `type: "bash_code_execution_result"`
1070
1071 - `content: array of BetaBashCodeExecutionOutputBlockParam`
1072
1073 - `type: "bash_code_execution_output"`
1074
1075 - `file_id: string`
1076
1077 - `return_code: number`
1078
1079 - `stderr: string`
1080
1081 - `stdout: string`
1082
1083 - `tool_use_id: string`
1084
1085 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1086
1087 - `cache_control: optional BetaCacheControlEphemeral or null`
1088
1089 Create a cache control breakpoint at this content block.
1090
1091 - `BetaTextEditorCodeExecutionToolResultBlockParam object`
1092
1093 - `type: "text_editor_code_execution_tool_result"`
1094
1095 - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam`
1096
1097 - `BetaTextEditorCodeExecutionToolResultErrorParam object`
1098
1099 - `type: "text_editor_code_execution_tool_result_error"`
1100
1101 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`
1102
1103 - `"invalid_tool_input"`
1104
1105 - `"unavailable"`
1106
1107 - `"too_many_requests"`
1108
1109 - `"execution_time_exceeded"`
1110
1111 - `"file_not_found"`
1112
1113 - `error_message: optional string or null`
1114
1115 - `BetaTextEditorCodeExecutionViewResultBlockParam object`
1116
1117 - `type: "text_editor_code_execution_view_result"`
1118
1119 - `content: string`
1120
1121 - `file_type: "text" or "image" or "pdf"`
1122
1123 - `"text"`
1124
1125 - `"image"`
1126
1127 - `"pdf"`
1128
1129 - `num_lines: optional number or null`
1130
1131 - `start_line: optional number or null`
1132
1133 - `total_lines: optional number or null`
1134
1135 - `BetaTextEditorCodeExecutionCreateResultBlockParam object`
1136
1137 - `type: "text_editor_code_execution_create_result"`
1138
1139 - `is_file_update: boolean`
1140
1141 - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object`
1142
1143 - `type: "text_editor_code_execution_str_replace_result"`
1144
1145 - `lines: optional array of string or null`
1146
1147 - `new_lines: optional number or null`
1148
1149 - `new_start: optional number or null`
1150
1151 - `old_lines: optional number or null`
1152
1153 - `old_start: optional number or null`
1154
1155 - `tool_use_id: string`
1156
1157 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1158
1159 - `cache_control: optional BetaCacheControlEphemeral or null`
1160
1161 Create a cache control breakpoint at this content block.
1162
1163 - `BetaToolSearchToolResultBlockParam object`
1164
1165 - `type: "tool_search_tool_result"`
1166
1167 - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam`
1168
1169 - `BetaToolSearchToolResultErrorParam object`
1170
1171 - `type: "tool_search_tool_result_error"`
1172
1173 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"`
1174
1175 - `"invalid_tool_input"`
1176
1177 - `"unavailable"`
1178
1179 - `"too_many_requests"`
1180
1181 - `"execution_time_exceeded"`
1182
1183 - `error_message: optional string or null`
1184
1185 - `BetaToolSearchToolSearchResultBlockParam object`
1186
1187 - `type: "tool_search_tool_search_result"`
1188
1189 - `tool_references: array of BetaToolReferenceBlockParam`
1190
1191 - `type: "tool_reference"`
1192
1193 - `tool_name: string`
1194
1195 minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$
1196
1197 - `cache_control: optional BetaCacheControlEphemeral or null`
1198
1199 Create a cache control breakpoint at this content block.
1200
1201 - `tool_use_id: string`
1202
1203 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1204
1205 - `cache_control: optional BetaCacheControlEphemeral or null`
1206
1207 Create a cache control breakpoint at this content block.
1208
1209 - `BetaMCPToolUseBlockParam object`
1210
1211 - `type: "mcp_tool_use"`
1212
1213 - `id: string`
1214
1215 pattern: ^[a-zA-Z0-9_-]+$
1216
1217 - `input: map[unknown]`
1218
1219 - `name: string`
1220
1221 - `server_name: string`
1222
1223 The name of the MCP server
1224
1225 - `cache_control: optional BetaCacheControlEphemeral or null`
1226
1227 Create a cache control breakpoint at this content block.
1228
1229 - `BetaRequestMCPToolResultBlockParam object`
1230
1231 - `type: "mcp_tool_result"`
1232
1233 - `tool_use_id: string`
1234
1235 pattern: ^[a-zA-Z0-9_-]+$
1236
1237 - `cache_control: optional BetaCacheControlEphemeral or null`
1238
1239 Create a cache control breakpoint at this content block.
1240
1241 - `content: optional string or array of BetaTextBlockParam`
1242
1243 - `string`
1244
1245 - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam`
1246
1247 - `type: "text"`
1248
1249 - `text: string`
1250
1251 minLength: 1
6071252
6081253 - `cache_control: optional BetaCacheControlEphemeral or null`
6091254
6101255 Create a cache control breakpoint at this content block.
6111256
612 - `BetaBrowserStateBlockParam object`
613
614 The caller's browser state after a browser toolset member call —
615 the full inventory of open tabs, which tab is active, and any side
616 effects (tabs opened, download state changes) the call produced.
617
618 At most one per `tool_result`, only on a non-error result answering a
619 browser toolset member `tool_use`. The server renders the
620 model-visible text from it; the model never sees the raw fields.
621
622 - `type: "browser_state"`
623
624 - `tabs: array of BetaBrowserStateTabEntry`
625
626 All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`.
627
628 maxItems: 100
629
630 - `tab_id: string`
631
632 The caller-assigned identifier for this tab, unique within the inventory.
633
634 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
635
636 - `title: string`
637
638 The title of the page the tab is showing. May be empty.
639
640 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
641
642 - `url: string`
643
644 The URL of the page the tab is showing. May be empty.
645
646 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
647
648 - `active: optional boolean`
649
650 Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`.
1257 - `citations: optional array of BetaTextCitationParam or null`
1258
1259 - `is_error: optional boolean`
1260
1261 - `BetaContainerUploadBlockParam object`
1262
1263 A content block that represents a file to be uploaded to the container
1264 Files uploaded via this block will be available in the container's input directory.
1265
1266 - `type: "container_upload"`
1267
1268 - `file_id: string`
1269
1270 - `cache_control: optional BetaCacheControlEphemeral or null`
1271
1272 Create a cache control breakpoint at this content block.
1273
1274 - `BetaCompactionBlockParam object`
1275
1276 A compaction block containing summary of previous context.
1277
1278 Users should round-trip these blocks from responses to subsequent requests
1279 to maintain context across compaction boundaries.
1280
1281 When content is None, the block represents a failed compaction. The server
1282 treats these as no-ops. Empty string content is not allowed.
1283
1284 - `type: "compaction"`
1285
1286 - `cache_control: optional BetaCacheControlEphemeral or null`
1287
1288 Create a cache control breakpoint at this content block.
1289
1290 - `content: optional string or null`
1291
1292 Summary of previously compacted content, or null if compaction failed
1293
1294 - `encrypted_content: optional string or null`
1295
1296 Opaque metadata from prior compaction, to be round-tripped verbatim
1297
1298 - `signature: optional string or null`
1299
1300 The block's signature as returned, to be sent back verbatim
1301
1302 - `tool_changes: optional array of BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock or null`
1303
1304 The tool changes of the compacted range, as the server returned them on this block: the `tool_addition` and `tool_removal` entries that take the request's `tools` to the tool set in effect at the end of the range. Send them back unchanged with the block.
1305
1306 - `BetaRequestToolAdditionBlock object`
1307
1308 Mid-conversation directive to make a tool available.
1309
1310 `tool` is a reference to a tool (or MCP toolset) declared in the
1311 request's `tools`. Under the `inline-tools-2026-09-15` beta it may
1312 instead be a reference to a tool defined earlier in `messages`, or a
1313 `tool_definition` object that carries an inline tool definition in
1314 `definition` (the same object a `tools` entry holds). An `mcp_toolset`
1315 definition also requires the `mcp-client-2026-09-15` beta. The tool is
1316 offered to the model from this point in the conversation onward.
1317
1318 - `type: "tool_addition"`
1319
1320 - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference or BetaToolChangeToolDefinitionParam`
1321
1322 - `BetaToolChangeToolReference object`
1323
1324 Reference to a single tool, by the name the model uses to call it: a
1325 tool declared in `tools` or defined by an earlier `tool_addition`
1326 block. Does not accept the composed `{server}_{name}` form the server
1327 assigns to MCP-resolved tools; use `mcp_tool_reference` or
1328 `mcp_toolset_reference` for those.
1329
1330 - `type: "tool_reference"`
1331
1332 - `name: string`
1333
1334 pattern: ^[a-zA-Z0-9_-]{1,128}$
1335
1336 - `BetaToolChangeMCPToolReference object`
1337
1338 Reference to a single MCP tool by its server and remote name; the
1339 same `server_name`/`name` pair `mcp_tool_use` carries.
1340
1341 - `type: "mcp_tool_reference"`
1342
1343 - `name: string`
1344
1345 - `server_name: string`
1346
1347 - `BetaToolChangeMCPToolsetReference object`
1348
1349 Reference to every tool in the named MCP server's toolset.
1350
1351 - `type: "mcp_toolset_reference"`
1352
1353 - `server_name: string`
1354
1355 - `BetaToolChangeToolDefinitionParam object`
1356
1357 A tool defined by value: `definition` is a `tools` entry (any kind
1358 `tools` accepts, an MCP toolset included). An `mcp_toolset` given here
1359 also requires the `mcp-client-2026-09-15` beta.
1360
1361 - `type: "tool_definition"`
1362
1363 - `definition: BetaToolUnion`
1364
1365 - `BetaTool object`
1366
1367 - `type: optional "custom" or null`
1368
1369 - `input_schema: object`
1370
1371 [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
1372
1373 This defines the shape of the `input` that your tool accepts and that the model will produce.
1374
1375 - `type: "object"`
1376
1377 - `properties: optional map[unknown] or null`
1378
1379 - `required: optional array of string or null`
1380
1381 - `name: string`
1382
1383 Name of the tool.
1384
1385 This is how the tool will be called by the model and in `tool_use` blocks.
1386
1387 minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$
1388
1389 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1390
1391 - `"direct"`
1392
1393 - `"code_execution_20250825"`
1394
1395 - `"code_execution_20260120"`
1396
1397 - `"code_execution_20260521"`
1398
1399 - `cache_control: optional BetaCacheControlEphemeral or null`
1400
1401 Create a cache control breakpoint at this content block.
1402
1403 - `defer_loading: optional boolean`
1404
1405 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1406
1407 - `description: optional string`
1408
1409 Description of what this tool does.
1410
1411 Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.
1412
1413 - `eager_input_streaming: optional boolean or null`
1414
1415 Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.
1416
1417 - `input_examples: optional array of map[unknown]`
1418
1419 - `strict: optional boolean`
1420
1421 When true, guarantees schema validation on tool names and inputs
1422
1423 - `BetaToolBash20241022 object`
1424
1425 - `type: "bash_20241022"`
1426
1427 - `name: "bash"`
1428
1429 Name of the tool.
1430
1431 This is how the tool will be called by the model and in `tool_use` blocks.
1432
1433 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1434
1435 - `"direct"`
1436
1437 - `"code_execution_20250825"`
1438
1439 - `"code_execution_20260120"`
1440
1441 - `"code_execution_20260521"`
1442
1443 - `cache_control: optional BetaCacheControlEphemeral or null`
1444
1445 Create a cache control breakpoint at this content block.
1446
1447 - `defer_loading: optional boolean`
1448
1449 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1450
1451 - `input_examples: optional array of map[unknown]`
1452
1453 - `strict: optional boolean`
1454
1455 When true, guarantees schema validation on tool names and inputs
1456
1457 - `BetaToolBash20250124 object`
1458
1459 - `type: "bash_20250124"`
1460
1461 - `name: "bash"`
1462
1463 Name of the tool.
1464
1465 This is how the tool will be called by the model and in `tool_use` blocks.
1466
1467 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1468
1469 - `"direct"`
1470
1471 - `"code_execution_20250825"`
1472
1473 - `"code_execution_20260120"`
1474
1475 - `"code_execution_20260521"`
1476
1477 - `cache_control: optional BetaCacheControlEphemeral or null`
1478
1479 Create a cache control breakpoint at this content block.
1480
1481 - `defer_loading: optional boolean`
1482
1483 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1484
1485 - `input_examples: optional array of map[unknown]`
1486
1487 - `strict: optional boolean`
1488
1489 When true, guarantees schema validation on tool names and inputs
1490
1491 - `BetaCodeExecutionTool20250522 object`
1492
1493 - `type: "code_execution_20250522"`
1494
1495 - `name: "code_execution"`
1496
1497 Name of the tool.
1498
1499 This is how the tool will be called by the model and in `tool_use` blocks.
1500
1501 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1502
1503 - `"direct"`
1504
1505 - `"code_execution_20250825"`
1506
1507 - `"code_execution_20260120"`
1508
1509 - `"code_execution_20260521"`
1510
1511 - `cache_control: optional BetaCacheControlEphemeral or null`
1512
1513 Create a cache control breakpoint at this content block.
1514
1515 - `defer_loading: optional boolean`
1516
1517 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1518
1519 - `strict: optional boolean`
1520
1521 When true, guarantees schema validation on tool names and inputs
1522
1523 - `BetaCodeExecutionTool20250825 object`
1524
1525 - `type: "code_execution_20250825"`
1526
1527 - `name: "code_execution"`
1528
1529 Name of the tool.
1530
1531 This is how the tool will be called by the model and in `tool_use` blocks.
1532
1533 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1534
1535 - `"direct"`
1536
1537 - `"code_execution_20250825"`
1538
1539 - `"code_execution_20260120"`
1540
1541 - `"code_execution_20260521"`
1542
1543 - `cache_control: optional BetaCacheControlEphemeral or null`
1544
1545 Create a cache control breakpoint at this content block.
1546
1547 - `defer_loading: optional boolean`
1548
1549 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1550
1551 - `strict: optional boolean`
1552
1553 When true, guarantees schema validation on tool names and inputs
1554
1555 - `BetaCodeExecutionTool20260120 object`
1556
1557 Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
1558
1559 - `type: "code_execution_20260120"`
1560
1561 - `name: "code_execution"`
1562
1563 Name of the tool.
1564
1565 This is how the tool will be called by the model and in `tool_use` blocks.
1566
1567 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1568
1569 - `"direct"`
1570
1571 - `"code_execution_20250825"`
1572
1573 - `"code_execution_20260120"`
1574
1575 - `"code_execution_20260521"`
1576
1577 - `cache_control: optional BetaCacheControlEphemeral or null`
1578
1579 Create a cache control breakpoint at this content block.
1580
1581 - `defer_loading: optional boolean`
1582
1583 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1584
1585 - `strict: optional boolean`
1586
1587 When true, guarantees schema validation on tool names and inputs
1588
1589 - `BetaCodeExecutionTool20260521 object`
1590
1591 Code execution tool with REPL state persistence.
1592
1593 - `type: "code_execution_20260521"`
1594
1595 - `name: "code_execution"`
1596
1597 Name of the tool.
1598
1599 This is how the tool will be called by the model and in `tool_use` blocks.
1600
1601 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1602
1603 - `"direct"`
1604
1605 - `"code_execution_20250825"`
1606
1607 - `"code_execution_20260120"`
1608
1609 - `"code_execution_20260521"`
1610
1611 - `cache_control: optional BetaCacheControlEphemeral or null`
1612
1613 Create a cache control breakpoint at this content block.
1614
1615 - `defer_loading: optional boolean`
1616
1617 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1618
1619 - `strict: optional boolean`
1620
1621 When true, guarantees schema validation on tool names and inputs
1622
1623 - `BetaBrowserToolset20260801 object`
1624
1625 The browser toolset: a single `tools[]` entry (carrying no
1626 `name`) that declares the browser tool family. The model is served
1627 the family's tool with any members disabled via `configs` removed
1628 from its schema.
1629
1630 - `type: "browser_toolset_20260801"`
1631
1632 - `cache_control: optional BetaCacheControlEphemeral or null`
1633
1634 Create a cache control breakpoint at this content block.
1635
1636 - `configs: optional BetaBrowserToolsetConfigs or null`
1637
1638 Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.
1639
1640 - `type: optional BetaBrowserTypeConfig or null`
1641
1642 `type`'s config overrides.
1643
1644 - `defer_loading: optional boolean or null`
1645
1646 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1647
1648 - `enabled: optional boolean or null`
1649
1650 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1651
1652 - `close_tab: optional BetaBrowserCloseTabConfig or null`
1653
1654 `close_tab`'s config overrides.
1655
1656 - `defer_loading: optional boolean or null`
1657
1658 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1659
1660 - `enabled: optional boolean or null`
1661
1662 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1663
1664 - `double_click: optional BetaBrowserDoubleClickConfig or null`
1665
1666 `double_click`'s config overrides.
1667
1668 - `defer_loading: optional boolean or null`
1669
1670 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1671
1672 - `enabled: optional boolean or null`
1673
1674 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1675
1676 - `file_upload: optional BetaBrowserFileUploadConfig or null`
1677
1678 `file_upload`'s config overrides.
1679
1680 - `defer_loading: optional boolean or null`
1681
1682 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1683
1684 - `enabled: optional boolean or null`
1685
1686 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1687
1688 - `find: optional BetaBrowserFindConfig or null`
1689
1690 `find`'s config overrides.
1691
1692 - `defer_loading: optional boolean or null`
1693
1694 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1695
1696 - `enabled: optional boolean or null`
1697
1698 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1699
1700 - `form_input: optional BetaBrowserFormInputConfig or null`
1701
1702 `form_input`'s config overrides.
1703
1704 - `defer_loading: optional boolean or null`
1705
1706 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1707
1708 - `enabled: optional boolean or null`
1709
1710 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1711
1712 - `get_page_text: optional BetaBrowserGetPageTextConfig or null`
1713
1714 `get_page_text`'s config overrides.
1715
1716 - `defer_loading: optional boolean or null`
1717
1718 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1719
1720 - `enabled: optional boolean or null`
1721
1722 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1723
1724 - `hold_key: optional BetaBrowserHoldKeyConfig or null`
1725
1726 `hold_key`'s config overrides.
1727
1728 - `defer_loading: optional boolean or null`
1729
1730 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1731
1732 - `enabled: optional boolean or null`
1733
1734 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1735
1736 - `hover: optional BetaBrowserHoverConfig or null`
1737
1738 `hover`'s config overrides.
1739
1740 - `defer_loading: optional boolean or null`
1741
1742 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1743
1744 - `enabled: optional boolean or null`
1745
1746 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1747
1748 - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null`
1749
1750 `javascript_exec`'s config overrides.
1751
1752 - `defer_loading: optional boolean or null`
1753
1754 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1755
1756 - `enabled: optional boolean or null`
1757
1758 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1759
1760 - `key: optional BetaBrowserKeyConfig or null`
1761
1762 `key`'s config overrides.
1763
1764 - `defer_loading: optional boolean or null`
1765
1766 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1767
1768 - `enabled: optional boolean or null`
1769
1770 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1771
1772 - `left_click: optional BetaBrowserLeftClickConfig or null`
1773
1774 `left_click`'s config overrides.
1775
1776 - `defer_loading: optional boolean or null`
1777
1778 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1779
1780 - `enabled: optional boolean or null`
1781
1782 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1783
1784 - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null`
1785
1786 `left_click_drag`'s config overrides.
1787
1788 - `defer_loading: optional boolean or null`
1789
1790 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1791
1792 - `enabled: optional boolean or null`
1793
1794 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1795
1796 - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null`
1797
1798 `left_mouse_down`'s config overrides.
1799
1800 - `defer_loading: optional boolean or null`
1801
1802 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1803
1804 - `enabled: optional boolean or null`
1805
1806 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1807
1808 - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null`
1809
1810 `left_mouse_up`'s config overrides.
1811
1812 - `defer_loading: optional boolean or null`
1813
1814 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1815
1816 - `enabled: optional boolean or null`
1817
1818 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1819
1820 - `list_tabs: optional BetaBrowserListTabsConfig or null`
1821
1822 `list_tabs`'s config overrides.
1823
1824 - `defer_loading: optional boolean or null`
1825
1826 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1827
1828 - `enabled: optional boolean or null`
1829
1830 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1831
1832 - `middle_click: optional BetaBrowserMiddleClickConfig or null`
1833
1834 `middle_click`'s config overrides.
1835
1836 - `defer_loading: optional boolean or null`
1837
1838 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1839
1840 - `enabled: optional boolean or null`
1841
1842 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1843
1844 - `mouse_move: optional BetaBrowserMouseMoveConfig or null`
1845
1846 `mouse_move`'s config overrides.
1847
1848 - `defer_loading: optional boolean or null`
1849
1850 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1851
1852 - `enabled: optional boolean or null`
1853
1854 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1855
1856 - `navigate: optional BetaBrowserNavigateConfig or null`
1857
1858 `navigate`'s config overrides.
1859
1860 - `defer_loading: optional boolean or null`
1861
1862 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1863
1864 - `enabled: optional boolean or null`
1865
1866 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1867
1868 - `new_tab: optional BetaBrowserNewTabConfig or null`
1869
1870 `new_tab`'s config overrides.
1871
1872 - `defer_loading: optional boolean or null`
1873
1874 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1875
1876 - `enabled: optional boolean or null`
1877
1878 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1879
1880 - `read_console: optional BetaBrowserReadConsoleConfig or null`
1881
1882 `read_console`'s config overrides.
1883
1884 - `defer_loading: optional boolean or null`
1885
1886 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1887
1888 - `enabled: optional boolean or null`
1889
1890 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1891
1892 - `read_network: optional BetaBrowserReadNetworkConfig or null`
1893
1894 `read_network`'s config overrides.
1895
1896 - `defer_loading: optional boolean or null`
1897
1898 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1899
1900 - `enabled: optional boolean or null`
1901
1902 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1903
1904 - `read_page: optional BetaBrowserReadPageConfig or null`
1905
1906 `read_page`'s config overrides.
1907
1908 - `defer_loading: optional boolean or null`
1909
1910 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1911
1912 - `enabled: optional boolean or null`
1913
1914 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1915
1916 - `right_click: optional BetaBrowserRightClickConfig or null`
1917
1918 `right_click`'s config overrides.
1919
1920 - `defer_loading: optional boolean or null`
1921
1922 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1923
1924 - `enabled: optional boolean or null`
1925
1926 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1927
1928 - `screenshot: optional BetaBrowserScreenshotConfig or null`
1929
1930 `screenshot`'s config overrides.
1931
1932 - `defer_loading: optional boolean or null`
1933
1934 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1935
1936 - `enabled: optional boolean or null`
1937
1938 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1939
1940 - `scroll: optional BetaBrowserScrollConfig or null`
1941
1942 `scroll`'s config overrides.
1943
1944 - `defer_loading: optional boolean or null`
1945
1946 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1947
1948 - `enabled: optional boolean or null`
1949
1950 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1951
1952 - `scroll_to: optional BetaBrowserScrollToConfig or null`
1953
1954 `scroll_to`'s config overrides.
1955
1956 - `defer_loading: optional boolean or null`
1957
1958 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1959
1960 - `enabled: optional boolean or null`
1961
1962 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1963
1964 - `switch_tab: optional BetaBrowserSwitchTabConfig or null`
1965
1966 `switch_tab`'s config overrides.
1967
1968 - `defer_loading: optional boolean or null`
1969
1970 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1971
1972 - `enabled: optional boolean or null`
1973
1974 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1975
1976 - `triple_click: optional BetaBrowserTripleClickConfig or null`
1977
1978 `triple_click`'s config overrides.
1979
1980 - `defer_loading: optional boolean or null`
1981
1982 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1983
1984 - `enabled: optional boolean or null`
1985
1986 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1987
1988 - `wait: optional BetaBrowserWaitConfig or null`
1989
1990 `wait`'s config overrides.
1991
1992 - `defer_loading: optional boolean or null`
1993
1994 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1995
1996 - `enabled: optional boolean or null`
1997
1998 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1999
2000 - `zoom: optional BetaBrowserZoomConfig or null`
2001
2002 `zoom`'s config overrides.
2003
2004 - `defer_loading: optional boolean or null`
2005
2006 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2007
2008 - `enabled: optional boolean or null`
2009
2010 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2011
2012 - `BetaToolComputerUse20241022 object`
2013
2014 - `type: "computer_20241022"`
2015
2016 - `display_height_px: number`
2017
2018 The height of the display in pixels.
2019
2020 minimum: 1
2021
2022 - `display_width_px: number`
2023
2024 The width of the display in pixels.
2025
2026 minimum: 1
2027
2028 - `name: "computer"`
2029
2030 Name of the tool.
2031
2032 This is how the tool will be called by the model and in `tool_use` blocks.
2033
2034 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2035
2036 - `"direct"`
2037
2038 - `"code_execution_20250825"`
2039
2040 - `"code_execution_20260120"`
2041
2042 - `"code_execution_20260521"`
2043
2044 - `cache_control: optional BetaCacheControlEphemeral or null`
2045
2046 Create a cache control breakpoint at this content block.
2047
2048 - `defer_loading: optional boolean`
2049
2050 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2051
2052 - `display_number: optional number or null`
2053
2054 The X11 display number (e.g. 0, 1) for the display.
2055
2056 minimum: 0
2057
2058 - `input_examples: optional array of map[unknown]`
2059
2060 - `strict: optional boolean`
2061
2062 When true, guarantees schema validation on tool names and inputs
2063
2064 - `BetaMemoryTool20250818 object`
2065
2066 - `type: "memory_20250818"`
2067
2068 - `name: "memory"`
2069
2070 Name of the tool.
2071
2072 This is how the tool will be called by the model and in `tool_use` blocks.
2073
2074 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2075
2076 - `"direct"`
2077
2078 - `"code_execution_20250825"`
2079
2080 - `"code_execution_20260120"`
2081
2082 - `"code_execution_20260521"`
2083
2084 - `cache_control: optional BetaCacheControlEphemeral or null`
2085
2086 Create a cache control breakpoint at this content block.
2087
2088 - `defer_loading: optional boolean`
2089
2090 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2091
2092 - `input_examples: optional array of map[unknown]`
2093
2094 - `strict: optional boolean`
2095
2096 When true, guarantees schema validation on tool names and inputs
2097
2098 - `BetaToolComputerUse20250124 object`
2099
2100 - `type: "computer_20250124"`
2101
2102 - `display_height_px: number`
2103
2104 The height of the display in pixels.
2105
2106 minimum: 1
2107
2108 - `display_width_px: number`
2109
2110 The width of the display in pixels.
2111
2112 minimum: 1
2113
2114 - `name: "computer"`
2115
2116 Name of the tool.
2117
2118 This is how the tool will be called by the model and in `tool_use` blocks.
2119
2120 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2121
2122 - `"direct"`
2123
2124 - `"code_execution_20250825"`
2125
2126 - `"code_execution_20260120"`
2127
2128 - `"code_execution_20260521"`
2129
2130 - `cache_control: optional BetaCacheControlEphemeral or null`
2131
2132 Create a cache control breakpoint at this content block.
2133
2134 - `defer_loading: optional boolean`
2135
2136 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2137
2138 - `display_number: optional number or null`
2139
2140 The X11 display number (e.g. 0, 1) for the display.
2141
2142 minimum: 0
2143
2144 - `input_examples: optional array of map[unknown]`
2145
2146 - `strict: optional boolean`
2147
2148 When true, guarantees schema validation on tool names and inputs
2149
2150 - `BetaToolTextEditor20241022 object`
2151
2152 - `type: "text_editor_20241022"`
2153
2154 - `name: "str_replace_editor"`
2155
2156 Name of the tool.
2157
2158 This is how the tool will be called by the model and in `tool_use` blocks.
2159
2160 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2161
2162 - `"direct"`
2163
2164 - `"code_execution_20250825"`
2165
2166 - `"code_execution_20260120"`
2167
2168 - `"code_execution_20260521"`
2169
2170 - `cache_control: optional BetaCacheControlEphemeral or null`
2171
2172 Create a cache control breakpoint at this content block.
2173
2174 - `defer_loading: optional boolean`
2175
2176 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2177
2178 - `input_examples: optional array of map[unknown]`
2179
2180 - `strict: optional boolean`
2181
2182 When true, guarantees schema validation on tool names and inputs
2183
2184 - `BetaToolComputerUse20251124 object`
2185
2186 - `type: "computer_20251124"`
2187
2188 - `display_height_px: number`
2189
2190 The height of the display in pixels.
2191
2192 minimum: 1
2193
2194 - `display_width_px: number`
2195
2196 The width of the display in pixels.
2197
2198 minimum: 1
2199
2200 - `name: "computer"`
2201
2202 Name of the tool.
2203
2204 This is how the tool will be called by the model and in `tool_use` blocks.
2205
2206 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2207
2208 - `"direct"`
2209
2210 - `"code_execution_20250825"`
2211
2212 - `"code_execution_20260120"`
2213
2214 - `"code_execution_20260521"`
2215
2216 - `cache_control: optional BetaCacheControlEphemeral or null`
2217
2218 Create a cache control breakpoint at this content block.
2219
2220 - `defer_loading: optional boolean`
2221
2222 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2223
2224 - `display_number: optional number or null`
2225
2226 The X11 display number (e.g. 0, 1) for the display.
2227
2228 minimum: 0
2229
2230 - `enable_zoom: optional boolean`
2231
2232 Whether to enable an action to take a zoomed-in screenshot of the screen.
2233
2234 - `input_examples: optional array of map[unknown]`
2235
2236 - `strict: optional boolean`
2237
2238 When true, guarantees schema validation on tool names and inputs
2239
2240 - `BetaComputerToolset20260801 object`
2241
2242 The computer toolset: a single `tools[]` entry (carrying no
2243 `name`) that declares the computer tool family. The model is
2244 served the family's tool with any members disabled via `configs`
2245 removed from its schema. Every member is enabled by default, zoom
2246 included. The single-tool options `display_number` and
2247 `enable_zoom` are not fields of a toolset entry — it carries only
2248 `type`, `configs`, and `cache_control`; zoom is controlled
2249 via `configs.zoom.enabled`.
2250
2251 - `type: "computer_toolset_20260801"`
2252
2253 - `cache_control: optional BetaCacheControlEphemeral or null`
2254
2255 Create a cache control breakpoint at this content block.
2256
2257 - `configs: optional BetaComputerToolsetConfigs or null`
2258
2259 Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.
2260
2261 - `type: optional BetaComputerTypeConfig or null`
2262
2263 `type`'s config overrides.
2264
2265 - `defer_loading: optional boolean or null`
2266
2267 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2268
2269 - `enabled: optional boolean or null`
2270
2271 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2272
2273 - `cursor_position: optional BetaComputerCursorPositionConfig or null`
2274
2275 `cursor_position`'s config overrides.
2276
2277 - `defer_loading: optional boolean or null`
2278
2279 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2280
2281 - `enabled: optional boolean or null`
2282
2283 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2284
2285 - `double_click: optional BetaComputerDoubleClickConfig or null`
2286
2287 `double_click`'s config overrides.
2288
2289 - `defer_loading: optional boolean or null`
2290
2291 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2292
2293 - `enabled: optional boolean or null`
2294
2295 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2296
2297 - `hold_key: optional BetaComputerHoldKeyConfig or null`
2298
2299 `hold_key`'s config overrides.
2300
2301 - `defer_loading: optional boolean or null`
2302
2303 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2304
2305 - `enabled: optional boolean or null`
2306
2307 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2308
2309 - `key: optional BetaComputerKeyConfig or null`
2310
2311 `key`'s config overrides.
2312
2313 - `defer_loading: optional boolean or null`
2314
2315 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2316
2317 - `enabled: optional boolean or null`
2318
2319 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2320
2321 - `left_click: optional BetaComputerLeftClickConfig or null`
2322
2323 `left_click`'s config overrides.
2324
2325 - `defer_loading: optional boolean or null`
2326
2327 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2328
2329 - `enabled: optional boolean or null`
2330
2331 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2332
2333 - `left_click_drag: optional BetaComputerLeftClickDragConfig or null`
2334
2335 `left_click_drag`'s config overrides.
2336
2337 - `defer_loading: optional boolean or null`
2338
2339 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2340
2341 - `enabled: optional boolean or null`
2342
2343 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2344
2345 - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null`
2346
2347 `left_mouse_down`'s config overrides.
2348
2349 - `defer_loading: optional boolean or null`
2350
2351 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2352
2353 - `enabled: optional boolean or null`
2354
2355 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2356
2357 - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null`
2358
2359 `left_mouse_up`'s config overrides.
2360
2361 - `defer_loading: optional boolean or null`
2362
2363 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2364
2365 - `enabled: optional boolean or null`
2366
2367 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2368
2369 - `middle_click: optional BetaComputerMiddleClickConfig or null`
2370
2371 `middle_click`'s config overrides.
2372
2373 - `defer_loading: optional boolean or null`
2374
2375 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2376
2377 - `enabled: optional boolean or null`
2378
2379 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2380
2381 - `mouse_move: optional BetaComputerMouseMoveConfig or null`
2382
2383 `mouse_move`'s config overrides.
2384
2385 - `defer_loading: optional boolean or null`
2386
2387 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2388
2389 - `enabled: optional boolean or null`
2390
2391 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2392
2393 - `right_click: optional BetaComputerRightClickConfig or null`
2394
2395 `right_click`'s config overrides.
2396
2397 - `defer_loading: optional boolean or null`
2398
2399 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2400
2401 - `enabled: optional boolean or null`
2402
2403 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2404
2405 - `screenshot: optional BetaComputerScreenshotConfig or null`
2406
2407 `screenshot`'s config overrides.
2408
2409 - `defer_loading: optional boolean or null`
2410
2411 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2412
2413 - `enabled: optional boolean or null`
2414
2415 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2416
2417 - `scroll: optional BetaComputerScrollConfig or null`
2418
2419 `scroll`'s config overrides.
2420
2421 - `defer_loading: optional boolean or null`
2422
2423 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2424
2425 - `enabled: optional boolean or null`
2426
2427 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2428
2429 - `triple_click: optional BetaComputerTripleClickConfig or null`
2430
2431 `triple_click`'s config overrides.
2432
2433 - `defer_loading: optional boolean or null`
2434
2435 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2436
2437 - `enabled: optional boolean or null`
2438
2439 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2440
2441 - `wait: optional BetaComputerWaitConfig or null`
2442
2443 `wait`'s config overrides.
2444
2445 - `defer_loading: optional boolean or null`
2446
2447 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2448
2449 - `enabled: optional boolean or null`
2450
2451 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2452
2453 - `zoom: optional BetaComputerZoomConfig or null`
2454
2455 `zoom`'s config overrides.
2456
2457 - `defer_loading: optional boolean or null`
2458
2459 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2460
2461 - `enabled: optional boolean or null`
2462
2463 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2464
2465 - `BetaToolTextEditor20250124 object`
2466
2467 - `type: "text_editor_20250124"`
2468
2469 - `name: "str_replace_editor"`
2470
2471 Name of the tool.
2472
2473 This is how the tool will be called by the model and in `tool_use` blocks.
2474
2475 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2476
2477 - `"direct"`
2478
2479 - `"code_execution_20250825"`
2480
2481 - `"code_execution_20260120"`
2482
2483 - `"code_execution_20260521"`
2484
2485 - `cache_control: optional BetaCacheControlEphemeral or null`
2486
2487 Create a cache control breakpoint at this content block.
2488
2489 - `defer_loading: optional boolean`
2490
2491 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2492
2493 - `input_examples: optional array of map[unknown]`
2494
2495 - `strict: optional boolean`
2496
2497 When true, guarantees schema validation on tool names and inputs
2498
2499 - `BetaToolTextEditor20250429 object`
2500
2501 - `type: "text_editor_20250429"`
2502
2503 - `name: "str_replace_based_edit_tool"`
2504
2505 Name of the tool.
2506
2507 This is how the tool will be called by the model and in `tool_use` blocks.
2508
2509 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2510
2511 - `"direct"`
2512
2513 - `"code_execution_20250825"`
2514
2515 - `"code_execution_20260120"`
2516
2517 - `"code_execution_20260521"`
2518
2519 - `cache_control: optional BetaCacheControlEphemeral or null`
2520
2521 Create a cache control breakpoint at this content block.
2522
2523 - `defer_loading: optional boolean`
2524
2525 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2526
2527 - `input_examples: optional array of map[unknown]`
2528
2529 - `strict: optional boolean`
2530
2531 When true, guarantees schema validation on tool names and inputs
2532
2533 - `BetaToolTextEditor20250728 object`
2534
2535 - `type: "text_editor_20250728"`
2536
2537 - `name: "str_replace_based_edit_tool"`
2538
2539 Name of the tool.
2540
2541 This is how the tool will be called by the model and in `tool_use` blocks.
2542
2543 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2544
2545 - `"direct"`
2546
2547 - `"code_execution_20250825"`
2548
2549 - `"code_execution_20260120"`
2550
2551 - `"code_execution_20260521"`
2552
2553 - `cache_control: optional BetaCacheControlEphemeral or null`
2554
2555 Create a cache control breakpoint at this content block.
2556
2557 - `defer_loading: optional boolean`
2558
2559 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2560
2561 - `input_examples: optional array of map[unknown]`
2562
2563 - `max_characters: optional number or null`
2564
2565 Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.
2566
2567 minimum: 1
2568
2569 - `strict: optional boolean`
2570
2571 When true, guarantees schema validation on tool names and inputs
2572
2573 - `BetaWebSearchTool20250305 object`
2574
2575 - `type: "web_search_20250305"`
2576
2577 - `name: "web_search"`
2578
2579 Name of the tool.
2580
2581 This is how the tool will be called by the model and in `tool_use` blocks.
2582
2583 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2584
2585 - `"direct"`
2586
2587 - `"code_execution_20250825"`
2588
2589 - `"code_execution_20260120"`
2590
2591 - `"code_execution_20260521"`
2592
2593 - `allowed_domains: optional array of string or null`
2594
2595 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.
2596
2597 - `blocked_domains: optional array of string or null`
2598
2599 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.
2600
2601 - `cache_control: optional BetaCacheControlEphemeral or null`
2602
2603 Create a cache control breakpoint at this content block.
2604
2605 - `defer_loading: optional boolean`
2606
2607 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2608
2609 - `max_uses: optional number or null`
2610
2611 Maximum number of times the tool can be used in the API request.
2612
2613 minimum: 1
2614
2615 - `strict: optional boolean`
2616
2617 When true, guarantees schema validation on tool names and inputs
2618
2619 - `user_location: optional BetaUserLocation or null`
2620
2621 Parameters for the user's location. Used to provide more relevant search results.
2622
2623 - `type: "approximate"`
2624
2625 - `city: optional string or null`
2626
2627 The city of the user.
2628
2629 minLength: 1, maxLength: 255
2630
2631 - `country: optional string or null`
2632
2633 The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.
2634
2635 minLength: 2, maxLength: 2
2636
2637 - `region: optional string or null`
2638
2639 The region of the user.
2640
2641 minLength: 1, maxLength: 255
2642
2643 - `timezone: optional string or null`
2644
2645 The [IANA timezone](https://nodatime.org/TimeZones) of the user.
2646
2647 minLength: 1, maxLength: 255
2648
2649 - `BetaWebFetchTool20250910 object`
2650
2651 - `type: "web_fetch_20250910"`
2652
2653 - `name: "web_fetch"`
2654
2655 Name of the tool.
2656
2657 This is how the tool will be called by the model and in `tool_use` blocks.
2658
2659 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2660
2661 - `"direct"`
2662
2663 - `"code_execution_20250825"`
2664
2665 - `"code_execution_20260120"`
2666
2667 - `"code_execution_20260521"`
2668
2669 - `allowed_domains: optional array of string or null`
2670
2671 List of domains to allow fetching from
2672
2673 - `blocked_domains: optional array of string or null`
2674
2675 List of domains to block fetching from
2676
2677 - `cache_control: optional BetaCacheControlEphemeral or null`
2678
2679 Create a cache control breakpoint at this content block.
2680
2681 - `citations: optional BetaCitationsConfigParam or null`
2682
2683 Citations configuration for fetched documents. Citations are disabled by default.
2684
2685 - `defer_loading: optional boolean`
2686
2687 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2688
2689 - `max_content_tokens: optional number or null`
2690
2691 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
2692
2693 minimum: 1
2694
2695 - `max_uses: optional number or null`
2696
2697 Maximum number of times the tool can be used in the API request.
2698
2699 minimum: 1
2700
2701 - `strict: optional boolean`
2702
2703 When true, guarantees schema validation on tool names and inputs
2704
2705 - `url_sources: optional BetaWebFetchURLSources or null`
2706
2707 Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
2708
2709 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
2710
2711 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
2712
2713 - `BetaWebFetchURLSourceAll object`
2714
2715 The `url_sources` variant under which a source contributes in
2716 full: every result of the tool filter's source, or all user input.
2717
2718 - `type: "all"`
2719
2720 - `BetaWebFetchURLSourceNone object`
2721
2722 The `url_sources` variant under which a source contributes nothing:
2723 no result of the tool filter's source, or no user input.
2724
2725 - `type: "none"`
2726
2727 - `BetaWebFetchURLSourceOnly object`
2728
2729 The tool filter variant under which only the named tools' results
2730 contribute.
2731
2732 - `type: "only"`
2733
2734 - `tools: array of BetaWebFetchURLSourceToolReference`
2735
2736 - `type: "tool_reference"`
2737
2738 - `name: string`
2739
2740 - `BetaWebFetchURLSourceExcept object`
2741
2742 The tool filter variant under which every result but the named
2743 tools' contributes.
2744
2745 - `type: "except"`
2746
2747 - `tools: array of BetaWebFetchURLSourceToolReference`
2748
2749 - `type: "tool_reference"`
2750
2751 - `name: string`
2752
2753 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
2754
2755 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
2756
2757 - `BetaWebFetchURLSourceAll object`
2758
2759 The `url_sources` variant under which a source contributes in
2760 full: every result of the tool filter's source, or all user input.
2761
2762 - `BetaWebFetchURLSourceNone object`
2763
2764 The `url_sources` variant under which a source contributes nothing:
2765 no result of the tool filter's source, or no user input.
2766
2767 - `BetaWebFetchURLSourceOnly object`
2768
2769 The tool filter variant under which only the named tools' results
2770 contribute.
2771
2772 - `BetaWebFetchURLSourceExcept object`
2773
2774 The tool filter variant under which every result but the named
2775 tools' contributes.
2776
2777 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
2778
2779 Whether URLs in user messages are fetchable: "all" or "none".
2780
2781 - `BetaWebFetchURLSourceAll object`
2782
2783 The `url_sources` variant under which a source contributes in
2784 full: every result of the tool filter's source, or all user input.
2785
2786 - `BetaWebFetchURLSourceNone object`
2787
2788 The `url_sources` variant under which a source contributes nothing:
2789 no result of the tool filter's source, or no user input.
2790
2791 - `BetaWebSearchTool20260209 object`
2792
2793 - `type: "web_search_20260209"`
2794
2795 - `name: "web_search"`
2796
2797 Name of the tool.
2798
2799 This is how the tool will be called by the model and in `tool_use` blocks.
2800
2801 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2802
2803 - `"direct"`
2804
2805 - `"code_execution_20250825"`
2806
2807 - `"code_execution_20260120"`
2808
2809 - `"code_execution_20260521"`
2810
2811 - `allowed_domains: optional array of string or null`
2812
2813 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.
2814
2815 - `blocked_domains: optional array of string or null`
2816
2817 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.
2818
2819 - `cache_control: optional BetaCacheControlEphemeral or null`
2820
2821 Create a cache control breakpoint at this content block.
2822
2823 - `defer_loading: optional boolean`
2824
2825 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2826
2827 - `max_uses: optional number or null`
2828
2829 Maximum number of times the tool can be used in the API request.
2830
2831 minimum: 1
2832
2833 - `strict: optional boolean`
2834
2835 When true, guarantees schema validation on tool names and inputs
2836
2837 - `user_location: optional BetaUserLocation or null`
2838
2839 Parameters for the user's location. Used to provide more relevant search results.
2840
2841 - `BetaWebFetchTool20260209 object`
2842
2843 - `type: "web_fetch_20260209"`
2844
2845 - `name: "web_fetch"`
2846
2847 Name of the tool.
2848
2849 This is how the tool will be called by the model and in `tool_use` blocks.
2850
2851 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2852
2853 - `"direct"`
2854
2855 - `"code_execution_20250825"`
2856
2857 - `"code_execution_20260120"`
2858
2859 - `"code_execution_20260521"`
2860
2861 - `allowed_domains: optional array of string or null`
2862
2863 List of domains to allow fetching from
2864
2865 - `blocked_domains: optional array of string or null`
2866
2867 List of domains to block fetching from
2868
2869 - `cache_control: optional BetaCacheControlEphemeral or null`
2870
2871 Create a cache control breakpoint at this content block.
2872
2873 - `citations: optional BetaCitationsConfigParam or null`
2874
2875 Citations configuration for fetched documents. Citations are disabled by default.
2876
2877 - `defer_loading: optional boolean`
2878
2879 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2880
2881 - `max_content_tokens: optional number or null`
2882
2883 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
2884
2885 minimum: 1
2886
2887 - `max_uses: optional number or null`
2888
2889 Maximum number of times the tool can be used in the API request.
2890
2891 minimum: 1
2892
2893 - `strict: optional boolean`
2894
2895 When true, guarantees schema validation on tool names and inputs
2896
2897 - `url_sources: optional BetaWebFetchURLSources or null`
2898
2899 Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
2900
2901 - `BetaWebFetchTool20260309 object`
2902
2903 Web fetch tool with use_cache parameter for bypassing cached content.
2904
2905 - `type: "web_fetch_20260309"`
2906
2907 - `name: "web_fetch"`
2908
2909 Name of the tool.
2910
2911 This is how the tool will be called by the model and in `tool_use` blocks.
2912
2913 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2914
2915 - `"direct"`
2916
2917 - `"code_execution_20250825"`
2918
2919 - `"code_execution_20260120"`
2920
2921 - `"code_execution_20260521"`
2922
2923 - `allowed_domains: optional array of string or null`
2924
2925 List of domains to allow fetching from
2926
2927 - `blocked_domains: optional array of string or null`
2928
2929 List of domains to block fetching from
2930
2931 - `cache_control: optional BetaCacheControlEphemeral or null`
2932
2933 Create a cache control breakpoint at this content block.
2934
2935 - `citations: optional BetaCitationsConfigParam or null`
2936
2937 Citations configuration for fetched documents. Citations are disabled by default.
2938
2939 - `defer_loading: optional boolean`
2940
2941 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2942
2943 - `max_content_tokens: optional number or null`
2944
2945 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
2946
2947 minimum: 1
2948
2949 - `max_uses: optional number or null`
2950
2951 Maximum number of times the tool can be used in the API request.
2952
2953 minimum: 1
2954
2955 - `strict: optional boolean`
2956
2957 When true, guarantees schema validation on tool names and inputs
2958
2959 - `url_sources: optional BetaWebFetchURLSources or null`
2960
2961 Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
2962
2963 - `use_cache: optional boolean`
2964
2965 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
2966
2967 - `BetaWebSearchTool20260318 object`
2968
2969 - `type: "web_search_20260318"`
2970
2971 - `name: "web_search"`
2972
2973 Name of the tool.
2974
2975 This is how the tool will be called by the model and in `tool_use` blocks.
2976
2977 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2978
2979 - `"direct"`
2980
2981 - `"code_execution_20250825"`
2982
2983 - `"code_execution_20260120"`
2984
2985 - `"code_execution_20260521"`
2986
2987 - `allowed_domains: optional array of string or null`
2988
2989 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.
2990
2991 - `blocked_domains: optional array of string or null`
2992
2993 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.
2994
2995 - `cache_control: optional BetaCacheControlEphemeral or null`
2996
2997 Create a cache control breakpoint at this content block.
2998
2999 - `defer_loading: optional boolean`
3000
3001 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3002
3003 - `max_uses: optional number or null`
3004
3005 Maximum number of times the tool can be used in the API request.
3006
3007 minimum: 1
3008
3009 - `response_inclusion: optional "full" or "excluded"`
3010
3011 How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
3012
3013 - `"full"`
3014
3015 - `"excluded"`
3016
3017 - `strict: optional boolean`
3018
3019 When true, guarantees schema validation on tool names and inputs
3020
3021 - `user_location: optional BetaUserLocation or null`
3022
3023 Parameters for the user's location. Used to provide more relevant search results.
3024
3025 - `BetaWebFetchTool20260318 object`
3026
3027 - `type: "web_fetch_20260318"`
3028
3029 - `name: "web_fetch"`
3030
3031 Name of the tool.
3032
3033 This is how the tool will be called by the model and in `tool_use` blocks.
3034
3035 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
3036
3037 - `"direct"`
3038
3039 - `"code_execution_20250825"`
3040
3041 - `"code_execution_20260120"`
3042
3043 - `"code_execution_20260521"`
3044
3045 - `allowed_domains: optional array of string or null`
3046
3047 List of domains to allow fetching from
3048
3049 - `blocked_domains: optional array of string or null`
3050
3051 List of domains to block fetching from
3052
3053 - `cache_control: optional BetaCacheControlEphemeral or null`
3054
3055 Create a cache control breakpoint at this content block.
3056
3057 - `citations: optional BetaCitationsConfigParam or null`
3058
3059 Citations configuration for fetched documents. Citations are disabled by default.
3060
3061 - `defer_loading: optional boolean`
3062
3063 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3064
3065 - `max_content_tokens: optional number or null`
3066
3067 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
3068
3069 minimum: 1
3070
3071 - `max_uses: optional number or null`
3072
3073 Maximum number of times the tool can be used in the API request.
3074
3075 minimum: 1
3076
3077 - `response_inclusion: optional "full" or "excluded"`
3078
3079 How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
3080
3081 - `"full"`
3082
3083 - `"excluded"`
3084
3085 - `strict: optional boolean`
3086
3087 When true, guarantees schema validation on tool names and inputs
3088
3089 - `url_sources: optional BetaWebFetchURLSources or null`
3090
3091 Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
3092
3093 - `use_cache: optional boolean`
3094
3095 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
3096
3097 - `BetaAdvisorTool20260301 object`
3098
3099 - `type: "advisor_20260301"`
3100
3101 - `model: Model`
3102
3103 The model that will complete your prompt.
3104
3105 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
3106
3107 - `"claude-haiku-5-5"`
3108
3109 Fastest model for high-volume, real-time tasks
3110
3111 - `"claude-sonnet-5-5"`
3112
3113 Efficient model for coding and agents
3114
3115 - `"claude-fable-5-1"`
3116
3117 Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows
3118
3119 - `"claude-opus-5-5"`
3120
3121 Powerful intelligence for coding, knowledge work, and long-running agents
3122
3123 - `"claude-mythos-5-1"`
3124
3125 Our most capable model for cybersecurity and biology research, available through trusted access programs
3126
3127 - `"claude-sonnet-5"`
3128
3129 Efficient model for coding and agents
3130
3131 - `"claude-fable-5"`
3132
3133 Next generation of intelligence for the hardest knowledge work and coding problems
3134
3135 - `"claude-mythos-5"`
3136
3137 Most capable model for cybersecurity and biology research
3138
3139 - `"claude-opus-5"`
3140
3141 Powerful intelligence for long-running agents and coding
3142
3143 - `"claude-opus-4-8"`
3144
3145 Powerful intelligence for long-running agents and coding
3146
3147 - `"claude-opus-4-7"`
3148
3149 Powerful intelligence for long-running agents and coding
3150
3151 - `"claude-opus-4-6"`
3152
3153 Powerful intelligence for long-running agents and coding
3154
3155 - `"claude-sonnet-4-6"`
3156
3157 Best combination of speed and intelligence
3158
3159 - `"claude-haiku-4-5"`
3160
3161 - `"claude-haiku-4-5-20251001"`
3162
3163 - `"claude-opus-4-5"`
3164
3165 Powerful intelligence for long-running agents and coding
3166
3167 - `"claude-opus-4-5-20251101"`
3168
3169 Powerful intelligence for long-running agents and coding
3170
3171 - `"claude-mythos-preview"`
3172
3173 **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.
3174
3175 New class of intelligence, strongest in coding and cybersecurity
3176
3177 - `"claude-sonnet-4-5"`
3178
3179 **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.
3180
3181 High-performance model for agents and coding
3182
3183 - `"claude-sonnet-4-5-20250929"`
3184
3185 **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.
3186
3187 High-performance model for agents and coding
3188
3189 - `string`
3190
3191 - `name: "advisor"`
3192
3193 Name of the tool.
3194
3195 This is how the tool will be called by the model and in `tool_use` blocks.
3196
3197 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
3198
3199 - `"direct"`
3200
3201 - `"code_execution_20250825"`
3202
3203 - `"code_execution_20260120"`
3204
3205 - `"code_execution_20260521"`
3206
3207 - `cache_control: optional BetaCacheControlEphemeral or null`
3208
3209 Create a cache control breakpoint at this content block.
3210
3211 - `caching: optional BetaCacheControlEphemeral or null`
3212
3213 Caching for the advisor's own prompt. When set, each advisor call writes a cache entry at the given TTL so subsequent calls in the same conversation read the stable prefix. When omitted, the advisor prompt is not cached.
3214
3215 - `defer_loading: optional boolean`
3216
3217 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3218
3219 - `max_tokens: optional number or null`
3220
3221 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the server also emits a remaining-tokens budget block in the advisor's prompt so the advisor self-shapes toward the cap. When omitted, the advisor model's default output cap applies and no budget block is emitted.
3222
3223 minimum: 1024
3224
3225 - `max_uses: optional number or null`
3226
3227 Maximum number of times the tool can be used in the API request.
3228
3229 minimum: 1
3230
3231 - `strict: optional boolean`
3232
3233 When true, guarantees schema validation on tool names and inputs
3234
3235 - `BetaToolSearchToolBm25_20251119 object`
3236
3237 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`
3238
3239 - `"tool_search_tool_bm25_20251119"`
3240
3241 - `"tool_search_tool_bm25"`
3242
3243 - `name: "tool_search_tool_bm25"`
3244
3245 Name of the tool.
3246
3247 This is how the tool will be called by the model and in `tool_use` blocks.
3248
3249 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
3250
3251 - `"direct"`
3252
3253 - `"code_execution_20250825"`
3254
3255 - `"code_execution_20260120"`
3256
3257 - `"code_execution_20260521"`
3258
3259 - `cache_control: optional BetaCacheControlEphemeral or null`
3260
3261 Create a cache control breakpoint at this content block.
3262
3263 - `defer_loading: optional boolean`
3264
3265 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3266
3267 - `strict: optional boolean`
3268
3269 When true, guarantees schema validation on tool names and inputs
3270
3271 - `BetaToolSearchToolRegex20251119 object`
3272
3273 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`
3274
3275 - `"tool_search_tool_regex_20251119"`
3276
3277 - `"tool_search_tool_regex"`
3278
3279 - `name: "tool_search_tool_regex"`
3280
3281 Name of the tool.
3282
3283 This is how the tool will be called by the model and in `tool_use` blocks.
3284
3285 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
3286
3287 - `"direct"`
3288
3289 - `"code_execution_20250825"`
3290
3291 - `"code_execution_20260120"`
3292
3293 - `"code_execution_20260521"`
3294
3295 - `cache_control: optional BetaCacheControlEphemeral or null`
3296
3297 Create a cache control breakpoint at this content block.
3298
3299 - `defer_loading: optional boolean`
3300
3301 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3302
3303 - `strict: optional boolean`
3304
3305 When true, guarantees schema validation on tool names and inputs
3306
3307 - `BetaMCPToolset object`
3308
3309 Configuration for a group of tools from an MCP server.
3310
3311 Allows configuring enabled status and defer_loading for all tools
3312 from an MCP server, with optional per-tool overrides.
3313
3314 - `type: "mcp_toolset"`
3315
3316 - `mcp_server_name: string`
3317
3318 Name of the MCP server to configure tools for
3319
3320 minLength: 1, maxLength: 255
3321
3322 - `cache_control: optional BetaCacheControlEphemeral or null`
3323
3324 Create a cache control breakpoint at this content block.
3325
3326 - `configs: optional map[BetaMCPToolConfig] or null`
3327
3328 Configuration overrides for specific tools, keyed by tool name
3329
3330 - `defer_loading: optional boolean`
3331
3332 - `enabled: optional boolean`
3333
3334 - `default_config: optional BetaMCPToolDefaultConfig`
3335
3336 Default configuration applied to all tools from this server
3337
3338 - `defer_loading: optional boolean`
3339
3340 - `enabled: optional boolean`
3341
3342 - `tools: optional array of BetaMCPToolParam or null`
3343
3344 The server's tool listing, pinned: when present, the server is not asked for its tools before sampling and exactly these entries, with `default_config` and `configs` applied, are the toolset's tools. Copy it from the `mcp_tool_listing` block of an earlier response.
3345
3346 - `input_schema: map[unknown]`
3347
3348 The tool's input schema as the MCP server lists it, verbatim.
3349
3350 - `name: string`
3351
3352 The tool's name as the MCP server lists it (not prefixed with the server name).
3353
3354 minLength: 1
3355
3356 - `description: optional string or null`
3357
3358 The tool's description as the MCP server lists it.
6513359
6523360 - `cache_control: optional BetaCacheControlEphemeral or null`
6533361
6543362 Create a cache control breakpoint at this content block.
6553363
656 - `state_changes: optional array of BetaBrowserStateChange or null`
657
658 Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list.
659
660 minItems: 1, maxItems: 200
661
662 - `BetaBrowserStateChangeTabOpened object`
663
664 A tab this call's execution opened that remains open at its end —
665 the creation delta of the `tabs` inventory, not an event log.
666
667 Carries only the `tab_id`; the tab's `title` and `url` live on its
668 `tabs` entry, which must include the same `tab_id`. A tab opened
669 during a failed call gets no deferred `tab_opened`; it simply appears
670 in the next result's `tabs` inventory.
671
672 - `type: "tab_opened"`
673
674 - `tab_id: string`
675
676 The `tab_id` of the opened tab, present in `tabs`.
677
678 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
679
680 - `BetaBrowserStateChangeDownloadStarted object`
681
682 A file download that started during this call.
683
684 - `type: "download_started"`
685
686 - `download_id: string`
687
688 The caller-assigned identifier for this download, stable across the state changes reporting it.
689
690 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
691
692 - `url: string`
693
694 The final post-redirect URL the download was served from.
695
696 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
697
698 - `BetaBrowserStateChangeDownloadCompleted object`
699
700 A file download that finished during this call, reported with the
701 same `download_id` as its `download_started` — or without a prior
702 `download_started`, when the download finished during the call that
703 started it (at most one state change per `download_id` per result).
704
705 - `type: "download_completed"`
706
707 - `download_id: string`
708
709 The caller-assigned identifier for this download, stable across the state changes reporting it.
710
711 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
712
713 - `url: string`
714
715 The final post-redirect URL the download was served from.
716
717 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
718
719 - `path: optional string or null`
720
721 Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path.
722
723 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
724
725 - `size_bytes: optional number or null`
726
727 The completed download's size.
728
729 minimum: 0
730
731 - `BetaBrowserStateChangeDownloadFailed object`
732
733 A file download that failed — or was cancelled — during this call.
734
735 - `type: "download_failed"`
736
737 - `download_id: string`
738
739 The caller-assigned identifier for this download, stable across the state changes reporting it.
740
741 minLength: 1, maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
742
743 - `url: string`
744
745 The final post-redirect URL the download was served from.
746
747 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
748
749 - `error: optional string or null`
750
751 The failure or cancellation detail, when known.
752
753 maxLength: 4096, pattern: ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$
754
755 - `is_error: optional boolean`
756
757 - `toolset_name: optional string or null`
758
759 For a toolset member tool_result, the toolset family of the paired tool_use.
760
761 minLength: 1, maxLength: 64, pattern: ^[a-zA-Z0-9_-]+$
762
763 - `BetaServerToolUseBlockParam object`
764
765 - `type: "server_tool_use"`
766
767 - `id: string`
768
769 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
770
771 - `input: map[unknown]`
772
773 - `name: "advisor" or "web_search" or "web_fetch" or 5 more`
774
775 - `"advisor"`
776
777 - `"web_search"`
778
779 - `"web_fetch"`
780
781 - `"code_execution"`
782
783 - `"bash_code_execution"`
784
785 - `"text_editor_code_execution"`
786
787 - `"tool_search_tool_regex"`
788
789 - `"tool_search_tool_bm25"`
790
791 - `cache_control: optional BetaCacheControlEphemeral or null`
792
793 Create a cache control breakpoint at this content block.
794
795 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
796
797 - `BetaDirectCaller object`
798
799 Tool invocation directly from the model.
800
801 - `BetaServerToolCaller object`
802
803 Tool invocation generated by a server-side tool.
804
805 - `BetaServerToolCaller20260120 object`
806
807 - `BetaWebSearchToolResultBlockParam object`
808
809 - `type: "web_search_tool_result"`
810
811 - `content: BetaWebSearchToolResultBlockParamContent`
812
813 - `ResultBlock = array of BetaWebSearchResultBlockParam`
814
815 - `type: "web_search_result"`
816
817 - `encrypted_content: string`
818
819 - `title: string`
820
821 - `url: string`
822
823 - `page_age: optional string or null`
824
825 - `BetaWebSearchToolRequestError object`
826
827 - `type: "web_search_tool_result_error"`
828
829 - `error_code: BetaWebSearchToolResultErrorCode`
830
831 - `"invalid_tool_input"`
832
833 - `"unavailable"`
834
835 - `"max_uses_exceeded"`
836
837 - `"too_many_requests"`
838
839 - `"query_too_long"`
840
841 - `"request_too_large"`
842
843 - `tool_use_id: string`
844
845 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
846
847 - `cache_control: optional BetaCacheControlEphemeral or null`
848
849 Create a cache control breakpoint at this content block.
850
851 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
852
853 - `BetaDirectCaller object`
854
855 Tool invocation directly from the model.
856
857 - `BetaServerToolCaller object`
858
859 Tool invocation generated by a server-side tool.
860
861 - `BetaServerToolCaller20260120 object`
862
863 - `BetaWebFetchToolResultBlockParam object`
864
865 - `type: "web_fetch_tool_result"`
866
867 - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam`
868
869 - `BetaWebFetchToolResultErrorBlockParam object`
870
871 - `type: "web_fetch_tool_result_error"`
872
873 - `error_code: BetaWebFetchToolResultErrorCode`
874
875 - `"invalid_tool_input"`
876
877 - `"url_too_long"`
878
879 - `"url_not_allowed"`
880
881 - `"url_not_in_prior_context"`
882
883 - `"url_not_accessible"`
884
885 - `"unsupported_content_type"`
886
887 - `"too_many_requests"`
888
889 - `"max_uses_exceeded"`
890
891 - `"unavailable"`
892
893 - `"content_too_large"`
894
895 - `BetaWebFetchBlockParam object`
896
897 - `type: "web_fetch_result"`
898
899 - `content: BetaRequestDocumentBlock`
900
901 - `url: string`
902
903 Fetched content URL
904
905 - `retrieved_at: optional string or null`
906
907 ISO 8601 timestamp when the content was retrieved
908
909 - `tool_use_id: string`
910
911 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
912
913 - `cache_control: optional BetaCacheControlEphemeral or null`
914
915 Create a cache control breakpoint at this content block.
916
917 - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120`
918
919 - `BetaDirectCaller object`
920
921 Tool invocation directly from the model.
922
923 - `BetaServerToolCaller object`
924
925 Tool invocation generated by a server-side tool.
926
927 - `BetaServerToolCaller20260120 object`
928
929 - `BetaAdvisorToolResultBlockParam object`
930
931 - `type: "advisor_tool_result"`
932
933 - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam`
934
935 - `BetaAdvisorToolResultErrorParam object`
936
937 - `type: "advisor_tool_result_error"`
938
939 - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more`
940
941 - `"max_uses_exceeded"`
942
943 - `"prompt_too_long"`
944
945 - `"too_many_requests"`
946
947 - `"overloaded"`
948
949 - `"unavailable"`
950
951 - `"execution_time_exceeded"`
952
953 - `"model_not_found"`
954
955 - `BetaAdvisorResultBlockParam object`
956
957 - `type: "advisor_result"`
958
959 - `text: string`
960
961 - `stop_reason: optional string or null`
962
963 - `BetaAdvisorRedactedResultBlockParam object`
964
965 - `type: "advisor_redacted_result"`
966
967 - `encrypted_content: string`
968
969 Opaque blob produced by a prior response; must be round-tripped verbatim.
970
971 - `stop_reason: optional string or null`
972
973 - `tool_use_id: string`
974
975 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
976
977 - `cache_control: optional BetaCacheControlEphemeral or null`
978
979 Create a cache control breakpoint at this content block.
980
981 - `BetaCodeExecutionToolResultBlockParam object`
982
983 - `type: "code_execution_tool_result"`
984
985 - `content: BetaCodeExecutionToolResultBlockParamContent`
986
987 - `BetaCodeExecutionToolResultErrorParam object`
988
989 - `type: "code_execution_tool_result_error"`
990
991 - `error_code: BetaCodeExecutionToolResultErrorCode`
992
993 - `"invalid_tool_input"`
994
995 - `"unavailable"`
996
997 - `"too_many_requests"`
998
999 - `"execution_time_exceeded"`
1000
1001 - `BetaCodeExecutionResultBlockParam object`
1002
1003 - `type: "code_execution_result"`
1004
1005 - `content: array of BetaCodeExecutionOutputBlockParam`
1006
1007 - `type: "code_execution_output"`
1008
1009 - `file_id: string`
1010
1011 - `return_code: number`
1012
1013 - `stderr: string`
1014
1015 - `stdout: string`
1016
1017 - `BetaEncryptedCodeExecutionResultBlockParam object`
1018
1019 Code execution result with encrypted stdout for PFC + web_search results.
1020
1021 - `type: "encrypted_code_execution_result"`
1022
1023 - `content: array of BetaCodeExecutionOutputBlockParam`
1024
1025 - `type: "code_execution_output"`
1026
1027 - `file_id: string`
1028
1029 - `encrypted_stdout: string`
1030
1031 - `return_code: number`
1032
1033 - `stderr: string`
1034
1035 - `tool_use_id: string`
1036
1037 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1038
1039 - `cache_control: optional BetaCacheControlEphemeral or null`
1040
1041 Create a cache control breakpoint at this content block.
1042
1043 - `BetaBashCodeExecutionToolResultBlockParam object`
1044
1045 - `type: "bash_code_execution_tool_result"`
1046
1047 - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam`
1048
1049 - `BetaBashCodeExecutionToolResultErrorParam object`
1050
1051 - `type: "bash_code_execution_tool_result_error"`
1052
1053 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`
1054
1055 - `"invalid_tool_input"`
1056
1057 - `"unavailable"`
1058
1059 - `"too_many_requests"`
1060
1061 - `"execution_time_exceeded"`
1062
1063 - `"output_file_too_large"`
1064
1065 - `BetaBashCodeExecutionResultBlockParam object`
1066
1067 - `type: "bash_code_execution_result"`
1068
1069 - `content: array of BetaBashCodeExecutionOutputBlockParam`
1070
1071 - `type: "bash_code_execution_output"`
1072
1073 - `file_id: string`
1074
1075 - `return_code: number`
1076
1077 - `stderr: string`
1078
1079 - `stdout: string`
1080
1081 - `tool_use_id: string`
1082
1083 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1084
1085 - `cache_control: optional BetaCacheControlEphemeral or null`
1086
1087 Create a cache control breakpoint at this content block.
1088
1089 - `BetaTextEditorCodeExecutionToolResultBlockParam object`
1090
1091 - `type: "text_editor_code_execution_tool_result"`
1092
1093 - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam`
1094
1095 - `BetaTextEditorCodeExecutionToolResultErrorParam object`
1096
1097 - `type: "text_editor_code_execution_tool_result_error"`
1098
1099 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more`
1100
1101 - `"invalid_tool_input"`
1102
1103 - `"unavailable"`
1104
1105 - `"too_many_requests"`
1106
1107 - `"execution_time_exceeded"`
1108
1109 - `"file_not_found"`
1110
1111 - `error_message: optional string or null`
1112
1113 - `BetaTextEditorCodeExecutionViewResultBlockParam object`
1114
1115 - `type: "text_editor_code_execution_view_result"`
1116
1117 - `content: string`
1118
1119 - `file_type: "text" or "image" or "pdf"`
1120
1121 - `"text"`
1122
1123 - `"image"`
1124
1125 - `"pdf"`
1126
1127 - `num_lines: optional number or null`
1128
1129 - `start_line: optional number or null`
1130
1131 - `total_lines: optional number or null`
1132
1133 - `BetaTextEditorCodeExecutionCreateResultBlockParam object`
1134
1135 - `type: "text_editor_code_execution_create_result"`
1136
1137 - `is_file_update: boolean`
1138
1139 - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object`
1140
1141 - `type: "text_editor_code_execution_str_replace_result"`
1142
1143 - `lines: optional array of string or null`
1144
1145 - `new_lines: optional number or null`
1146
1147 - `new_start: optional number or null`
1148
1149 - `old_lines: optional number or null`
1150
1151 - `old_start: optional number or null`
1152
1153 - `tool_use_id: string`
1154
1155 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1156
1157 - `cache_control: optional BetaCacheControlEphemeral or null`
1158
1159 Create a cache control breakpoint at this content block.
1160
1161 - `BetaToolSearchToolResultBlockParam object`
1162
1163 - `type: "tool_search_tool_result"`
1164
1165 - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam`
1166
1167 - `BetaToolSearchToolResultErrorParam object`
1168
1169 - `type: "tool_search_tool_result_error"`
1170
1171 - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"`
1172
1173 - `"invalid_tool_input"`
1174
1175 - `"unavailable"`
1176
1177 - `"too_many_requests"`
1178
1179 - `"execution_time_exceeded"`
1180
1181 - `error_message: optional string or null`
1182
1183 - `BetaToolSearchToolSearchResultBlockParam object`
1184
1185 - `type: "tool_search_tool_search_result"`
1186
1187 - `tool_references: array of BetaToolReferenceBlockParam`
1188
1189 - `type: "tool_reference"`
1190
1191 - `tool_name: string`
1192
1193 minLength: 1, maxLength: 256, pattern: ^[a-zA-Z0-9_-]{1,256}$
3364 - `BetaRequestToolRemovalBlock object`
3365
3366 Mid-conversation directive to withdraw a tool.
3367
3368 `tool` references a tool (or MCP toolset) by name: one declared in the
3369 request's `tools` or defined earlier in `messages`. It is no longer
3370 offered to the model from this point in the conversation onward.
3371
3372 - `type: "tool_removal"`
3373
3374 - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference`
3375
3376 - `BetaToolChangeToolReference object`
3377
3378 Reference to a single tool, by the name the model uses to call it: a
3379 tool declared in `tools` or defined by an earlier `tool_addition`
3380 block. Does not accept the composed `{server}_{name}` form the server
3381 assigns to MCP-resolved tools; use `mcp_tool_reference` or
3382 `mcp_toolset_reference` for those.
3383
3384 - `BetaToolChangeMCPToolReference object`
3385
3386 Reference to a single MCP tool by its server and remote name; the
3387 same `server_name`/`name` pair `mcp_tool_use` carries.
3388
3389 - `BetaToolChangeMCPToolsetReference object`
3390
3391 Reference to every tool in the named MCP server's toolset.
11943392
11953393 - `cache_control: optional BetaCacheControlEphemeral or null`
11963394
11973395 Create a cache control breakpoint at this content block.
11983396
1199 - `tool_use_id: string`
1200
1201 pattern: ^srvtoolu_[a-zA-Z0-9_]+$
1202
1203 - `cache_control: optional BetaCacheControlEphemeral or null`
1204
1205 Create a cache control breakpoint at this content block.
1206
1207 - `BetaMCPToolUseBlockParam object`
1208
1209 - `type: "mcp_tool_use"`
1210
1211 - `id: string`
1212
1213 pattern: ^[a-zA-Z0-9_-]+$
1214
1215 - `input: map[unknown]`
1216
1217 - `name: string`
1218
1219 - `server_name: string`
1220
1221 The name of the MCP server
1222
1223 - `cache_control: optional BetaCacheControlEphemeral or null`
1224
1225 Create a cache control breakpoint at this content block.
1226
1227 - `BetaRequestMCPToolResultBlockParam object`
1228
1229 - `type: "mcp_tool_result"`
1230
1231 - `tool_use_id: string`
1232
1233 pattern: ^[a-zA-Z0-9_-]+$
1234
1235 - `cache_control: optional BetaCacheControlEphemeral or null`
1236
1237 Create a cache control breakpoint at this content block.
1238
1239 - `content: optional string or array of BetaTextBlockParam`
1240
1241 - `string`
1242
1243 - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam`
1244
1245 - `type: "text"`
1246
1247 - `text: string`
3397 - `BetaRequestToolAdditionBlock object`
3398
3399 Mid-conversation directive to make a tool available.
3400
3401 `tool` is a reference to a tool (or MCP toolset) declared in the
3402 request's `tools`. Under the `inline-tools-2026-09-15` beta it may
3403 instead be a reference to a tool defined earlier in `messages`, or a
3404 `tool_definition` object that carries an inline tool definition in
3405 `definition` (the same object a `tools` entry holds). An `mcp_toolset`
3406 definition also requires the `mcp-client-2026-09-15` beta. The tool is
3407 offered to the model from this point in the conversation onward.
3408
3409 - `BetaRequestToolRemovalBlock object`
3410
3411 Mid-conversation directive to withdraw a tool.
3412
3413 `tool` references a tool (or MCP toolset) by name: one declared in the
3414 request's `tools` or defined earlier in `messages`. It is no longer
3415 offered to the model from this point in the conversation onward.
3416
3417 - `BetaMCPToolListingBlockParam object`
3418
3419 The tool listing an MCP server returned while an earlier response was
3420 produced, as that response carried it. Send the assistant message back
3421 unchanged, this block included, and the server uses this listing for the
3422 matching `mcp_toolset` instead of asking the MCP server again.
3423
3424 - `type: "mcp_tool_listing"`
3425
3426 - `mcp_server_name: string`
3427
3428 The name of the MCP server this listing came from, as `mcp_servers` declares it.
3429
3430 minLength: 1, maxLength: 255
3431
3432 - `tools: array of BetaMCPToolParam`
3433
3434 The server's tools, exactly as the response listed them.
3435
3436 - `input_schema: map[unknown]`
3437
3438 The tool's input schema as the MCP server lists it, verbatim.
3439
3440 - `name: string`
3441
3442 The tool's name as the MCP server lists it (not prefixed with the server name).
12483443
12493444 minLength: 1
12503445
1251 - `cache_control: optional BetaCacheControlEphemeral or null`
1252
1253 Create a cache control breakpoint at this content block.
1254
1255 - `citations: optional array of BetaTextCitationParam or null`
1256
1257 - `is_error: optional boolean`
1258
1259 - `BetaContainerUploadBlockParam object`
1260
1261 A content block that represents a file to be uploaded to the container
1262 Files uploaded via this block will be available in the container's input directory.
1263
1264 - `type: "container_upload"`
1265
1266 - `file_id: string`
1267
1268 - `cache_control: optional BetaCacheControlEphemeral or null`
1269
1270 Create a cache control breakpoint at this content block.
1271
1272 - `BetaCompactionBlockParam object`
1273
1274 A compaction block containing summary of previous context.
1275
1276 Users should round-trip these blocks from responses to subsequent requests
1277 to maintain context across compaction boundaries.
1278
1279 When content is None, the block represents a failed compaction. The server
1280 treats these as no-ops. Empty string content is not allowed.
1281
1282 - `type: "compaction"`
1283
1284 - `cache_control: optional BetaCacheControlEphemeral or null`
1285
1286 Create a cache control breakpoint at this content block.
1287
1288 - `content: optional string or null`
1289
1290 Summary of previously compacted content, or null if compaction failed
1291
1292 - `encrypted_content: optional string or null`
1293
1294 Opaque metadata from prior compaction, to be round-tripped verbatim
1295
1296 - `signature: optional string or null`
1297
1298 The block's signature as returned, to be sent back verbatim
1299
1300 - `tool_changes: optional array of BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock or null`
1301
1302 The tool changes of the compacted range, as the server returned them on this block: the `tool_addition` and `tool_removal` entries that take the request's `tools` to the tool set in effect at the end of the range. Send them back unchanged with the block.
1303
1304 - `BetaRequestToolAdditionBlock object`
1305
1306 Mid-conversation directive to make a tool available.
1307
1308 `tool` is a reference to a tool (or MCP toolset) declared in the
1309 request's `tools`. Under the `inline-tools-2026-09-15` beta it may
1310 instead be a reference to a tool defined earlier in `messages`, or a
1311 `tool_definition` object that carries an inline tool definition in
1312 `definition` (the same object a `tools` entry holds). An `mcp_toolset`
1313 definition also requires the `mcp-client-2026-09-15` beta. The tool is
1314 offered to the model from this point in the conversation onward.
1315
1316 - `type: "tool_addition"`
1317
1318 - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference or BetaToolChangeToolDefinitionParam`
1319
1320 - `BetaToolChangeToolReference object`
1321
1322 Reference to a single tool, by the name the model uses to call it: a
1323 tool declared in `tools` or defined by an earlier `tool_addition`
1324 block. Does not accept the composed `{server}_{name}` form the server
1325 assigns to MCP-resolved tools; use `mcp_tool_reference` or
1326 `mcp_toolset_reference` for those.
1327
1328 - `type: "tool_reference"`
1329
1330 - `name: string`
1331
1332 pattern: ^[a-zA-Z0-9_-]{1,128}$
1333
1334 - `BetaToolChangeMCPToolReference object`
1335
1336 Reference to a single MCP tool by its server and remote name; the
1337 same `server_name`/`name` pair `mcp_tool_use` carries.
1338
1339 - `type: "mcp_tool_reference"`
1340
1341 - `name: string`
1342
1343 - `server_name: string`
1344
1345 - `BetaToolChangeMCPToolsetReference object`
1346
1347 Reference to every tool in the named MCP server's toolset.
1348
1349 - `type: "mcp_toolset_reference"`
1350
1351 - `server_name: string`
1352
1353 - `BetaToolChangeToolDefinitionParam object`
1354
1355 A tool defined by value: `definition` is a `tools` entry (any kind
1356 `tools` accepts, an MCP toolset included). An `mcp_toolset` given here
1357 also requires the `mcp-client-2026-09-15` beta.
1358
1359 - `type: "tool_definition"`
1360
1361 - `definition: BetaToolUnion`
1362
1363 - `BetaTool object`
1364
1365 - `type: optional "custom" or null`
1366
1367 - `input_schema: object`
1368
1369 [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
1370
1371 This defines the shape of the `input` that your tool accepts and that the model will produce.
1372
1373 - `type: "object"`
1374
1375 - `properties: optional map[unknown] or null`
1376
1377 - `required: optional array of string or null`
1378
1379 - `name: string`
1380
1381 Name of the tool.
1382
1383 This is how the tool will be called by the model and in `tool_use` blocks.
1384
1385 minLength: 1, maxLength: 128, pattern: ^[a-zA-Z0-9_-]{1,128}$
1386
1387 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1388
1389 - `"direct"`
1390
1391 - `"code_execution_20250825"`
1392
1393 - `"code_execution_20260120"`
1394
1395 - `"code_execution_20260521"`
1396
1397 - `cache_control: optional BetaCacheControlEphemeral or null`
1398
1399 Create a cache control breakpoint at this content block.
1400
1401 - `defer_loading: optional boolean`
1402
1403 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1404
1405 - `description: optional string`
1406
1407 Description of what this tool does.
1408
1409 Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.
1410
1411 - `eager_input_streaming: optional boolean or null`
1412
1413 Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.
1414
1415 - `input_examples: optional array of map[unknown]`
1416
1417 - `strict: optional boolean`
1418
1419 When true, guarantees schema validation on tool names and inputs
1420
1421 - `BetaToolBash20241022 object`
1422
1423 - `type: "bash_20241022"`
1424
1425 - `name: "bash"`
1426
1427 Name of the tool.
1428
1429 This is how the tool will be called by the model and in `tool_use` blocks.
1430
1431 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1432
1433 - `"direct"`
1434
1435 - `"code_execution_20250825"`
1436
1437 - `"code_execution_20260120"`
1438
1439 - `"code_execution_20260521"`
1440
1441 - `cache_control: optional BetaCacheControlEphemeral or null`
1442
1443 Create a cache control breakpoint at this content block.
1444
1445 - `defer_loading: optional boolean`
1446
1447 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1448
1449 - `input_examples: optional array of map[unknown]`
1450
1451 - `strict: optional boolean`
1452
1453 When true, guarantees schema validation on tool names and inputs
1454
1455 - `BetaToolBash20250124 object`
1456
1457 - `type: "bash_20250124"`
1458
1459 - `name: "bash"`
1460
1461 Name of the tool.
1462
1463 This is how the tool will be called by the model and in `tool_use` blocks.
1464
1465 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1466
1467 - `"direct"`
1468
1469 - `"code_execution_20250825"`
1470
1471 - `"code_execution_20260120"`
1472
1473 - `"code_execution_20260521"`
1474
1475 - `cache_control: optional BetaCacheControlEphemeral or null`
1476
1477 Create a cache control breakpoint at this content block.
1478
1479 - `defer_loading: optional boolean`
1480
1481 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1482
1483 - `input_examples: optional array of map[unknown]`
1484
1485 - `strict: optional boolean`
1486
1487 When true, guarantees schema validation on tool names and inputs
1488
1489 - `BetaCodeExecutionTool20250522 object`
1490
1491 - `type: "code_execution_20250522"`
1492
1493 - `name: "code_execution"`
1494
1495 Name of the tool.
1496
1497 This is how the tool will be called by the model and in `tool_use` blocks.
1498
1499 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1500
1501 - `"direct"`
1502
1503 - `"code_execution_20250825"`
1504
1505 - `"code_execution_20260120"`
1506
1507 - `"code_execution_20260521"`
1508
1509 - `cache_control: optional BetaCacheControlEphemeral or null`
1510
1511 Create a cache control breakpoint at this content block.
1512
1513 - `defer_loading: optional boolean`
1514
1515 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1516
1517 - `strict: optional boolean`
1518
1519 When true, guarantees schema validation on tool names and inputs
1520
1521 - `BetaCodeExecutionTool20250825 object`
1522
1523 - `type: "code_execution_20250825"`
1524
1525 - `name: "code_execution"`
1526
1527 Name of the tool.
1528
1529 This is how the tool will be called by the model and in `tool_use` blocks.
1530
1531 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1532
1533 - `"direct"`
1534
1535 - `"code_execution_20250825"`
1536
1537 - `"code_execution_20260120"`
1538
1539 - `"code_execution_20260521"`
1540
1541 - `cache_control: optional BetaCacheControlEphemeral or null`
1542
1543 Create a cache control breakpoint at this content block.
1544
1545 - `defer_loading: optional boolean`
1546
1547 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1548
1549 - `strict: optional boolean`
1550
1551 When true, guarantees schema validation on tool names and inputs
1552
1553 - `BetaCodeExecutionTool20260120 object`
1554
1555 Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
1556
1557 - `type: "code_execution_20260120"`
1558
1559 - `name: "code_execution"`
1560
1561 Name of the tool.
1562
1563 This is how the tool will be called by the model and in `tool_use` blocks.
1564
1565 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1566
1567 - `"direct"`
1568
1569 - `"code_execution_20250825"`
1570
1571 - `"code_execution_20260120"`
1572
1573 - `"code_execution_20260521"`
1574
1575 - `cache_control: optional BetaCacheControlEphemeral or null`
1576
1577 Create a cache control breakpoint at this content block.
1578
1579 - `defer_loading: optional boolean`
1580
1581 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1582
1583 - `strict: optional boolean`
1584
1585 When true, guarantees schema validation on tool names and inputs
1586
1587 - `BetaCodeExecutionTool20260521 object`
1588
1589 Code execution tool with REPL state persistence.
1590
1591 - `type: "code_execution_20260521"`
1592
1593 - `name: "code_execution"`
1594
1595 Name of the tool.
1596
1597 This is how the tool will be called by the model and in `tool_use` blocks.
1598
1599 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
1600
1601 - `"direct"`
1602
1603 - `"code_execution_20250825"`
1604
1605 - `"code_execution_20260120"`
1606
1607 - `"code_execution_20260521"`
1608
1609 - `cache_control: optional BetaCacheControlEphemeral or null`
1610
1611 Create a cache control breakpoint at this content block.
1612
1613 - `defer_loading: optional boolean`
1614
1615 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
1616
1617 - `strict: optional boolean`
1618
1619 When true, guarantees schema validation on tool names and inputs
1620
1621 - `BetaBrowserToolset20260801 object`
1622
1623 The browser toolset: a single `tools[]` entry (carrying no
1624 `name`) that declares the browser tool family. The model is served
1625 the family's tool with any members disabled via `configs` removed
1626 from its schema.
1627
1628 - `type: "browser_toolset_20260801"`
1629
1630 - `cache_control: optional BetaCacheControlEphemeral or null`
1631
1632 Create a cache control breakpoint at this content block.
1633
1634 - `configs: optional BetaBrowserToolsetConfigs or null`
1635
1636 Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.
1637
1638 - `type: optional BetaBrowserTypeConfig or null`
1639
1640 `type`'s config overrides.
1641
1642 - `defer_loading: optional boolean or null`
1643
1644 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1645
1646 - `enabled: optional boolean or null`
1647
1648 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1649
1650 - `close_tab: optional BetaBrowserCloseTabConfig or null`
1651
1652 `close_tab`'s config overrides.
1653
1654 - `defer_loading: optional boolean or null`
1655
1656 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1657
1658 - `enabled: optional boolean or null`
1659
1660 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1661
1662 - `double_click: optional BetaBrowserDoubleClickConfig or null`
1663
1664 `double_click`'s config overrides.
1665
1666 - `defer_loading: optional boolean or null`
1667
1668 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1669
1670 - `enabled: optional boolean or null`
1671
1672 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1673
1674 - `file_upload: optional BetaBrowserFileUploadConfig or null`
1675
1676 `file_upload`'s config overrides.
1677
1678 - `defer_loading: optional boolean or null`
1679
1680 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1681
1682 - `enabled: optional boolean or null`
1683
1684 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1685
1686 - `find: optional BetaBrowserFindConfig or null`
1687
1688 `find`'s config overrides.
1689
1690 - `defer_loading: optional boolean or null`
1691
1692 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1693
1694 - `enabled: optional boolean or null`
1695
1696 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1697
1698 - `form_input: optional BetaBrowserFormInputConfig or null`
1699
1700 `form_input`'s config overrides.
1701
1702 - `defer_loading: optional boolean or null`
1703
1704 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1705
1706 - `enabled: optional boolean or null`
1707
1708 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1709
1710 - `get_page_text: optional BetaBrowserGetPageTextConfig or null`
1711
1712 `get_page_text`'s config overrides.
1713
1714 - `defer_loading: optional boolean or null`
1715
1716 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1717
1718 - `enabled: optional boolean or null`
1719
1720 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1721
1722 - `hold_key: optional BetaBrowserHoldKeyConfig or null`
1723
1724 `hold_key`'s config overrides.
1725
1726 - `defer_loading: optional boolean or null`
1727
1728 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1729
1730 - `enabled: optional boolean or null`
1731
1732 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1733
1734 - `hover: optional BetaBrowserHoverConfig or null`
1735
1736 `hover`'s config overrides.
1737
1738 - `defer_loading: optional boolean or null`
1739
1740 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1741
1742 - `enabled: optional boolean or null`
1743
1744 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1745
1746 - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null`
1747
1748 `javascript_exec`'s config overrides.
1749
1750 - `defer_loading: optional boolean or null`
1751
1752 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1753
1754 - `enabled: optional boolean or null`
1755
1756 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1757
1758 - `key: optional BetaBrowserKeyConfig or null`
1759
1760 `key`'s config overrides.
1761
1762 - `defer_loading: optional boolean or null`
1763
1764 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1765
1766 - `enabled: optional boolean or null`
1767
1768 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1769
1770 - `left_click: optional BetaBrowserLeftClickConfig or null`
1771
1772 `left_click`'s config overrides.
1773
1774 - `defer_loading: optional boolean or null`
1775
1776 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1777
1778 - `enabled: optional boolean or null`
1779
1780 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1781
1782 - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null`
1783
1784 `left_click_drag`'s config overrides.
1785
1786 - `defer_loading: optional boolean or null`
1787
1788 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1789
1790 - `enabled: optional boolean or null`
1791
1792 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1793
1794 - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null`
1795
1796 `left_mouse_down`'s config overrides.
1797
1798 - `defer_loading: optional boolean or null`
1799
1800 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1801
1802 - `enabled: optional boolean or null`
1803
1804 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1805
1806 - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null`
1807
1808 `left_mouse_up`'s config overrides.
1809
1810 - `defer_loading: optional boolean or null`
1811
1812 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1813
1814 - `enabled: optional boolean or null`
1815
1816 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1817
1818 - `list_tabs: optional BetaBrowserListTabsConfig or null`
1819
1820 `list_tabs`'s config overrides.
1821
1822 - `defer_loading: optional boolean or null`
1823
1824 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1825
1826 - `enabled: optional boolean or null`
1827
1828 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1829
1830 - `middle_click: optional BetaBrowserMiddleClickConfig or null`
1831
1832 `middle_click`'s config overrides.
1833
1834 - `defer_loading: optional boolean or null`
1835
1836 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1837
1838 - `enabled: optional boolean or null`
1839
1840 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1841
1842 - `mouse_move: optional BetaBrowserMouseMoveConfig or null`
1843
1844 `mouse_move`'s config overrides.
1845
1846 - `defer_loading: optional boolean or null`
1847
1848 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1849
1850 - `enabled: optional boolean or null`
1851
1852 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1853
1854 - `navigate: optional BetaBrowserNavigateConfig or null`
1855
1856 `navigate`'s config overrides.
1857
1858 - `defer_loading: optional boolean or null`
1859
1860 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1861
1862 - `enabled: optional boolean or null`
1863
1864 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1865
1866 - `new_tab: optional BetaBrowserNewTabConfig or null`
1867
1868 `new_tab`'s config overrides.
1869
1870 - `defer_loading: optional boolean or null`
1871
1872 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1873
1874 - `enabled: optional boolean or null`
1875
1876 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1877
1878 - `read_console: optional BetaBrowserReadConsoleConfig or null`
1879
1880 `read_console`'s config overrides.
1881
1882 - `defer_loading: optional boolean or null`
1883
1884 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1885
1886 - `enabled: optional boolean or null`
1887
1888 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1889
1890 - `read_network: optional BetaBrowserReadNetworkConfig or null`
1891
1892 `read_network`'s config overrides.
1893
1894 - `defer_loading: optional boolean or null`
1895
1896 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1897
1898 - `enabled: optional boolean or null`
1899
1900 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1901
1902 - `read_page: optional BetaBrowserReadPageConfig or null`
1903
1904 `read_page`'s config overrides.
1905
1906 - `defer_loading: optional boolean or null`
1907
1908 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1909
1910 - `enabled: optional boolean or null`
1911
1912 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1913
1914 - `right_click: optional BetaBrowserRightClickConfig or null`
1915
1916 `right_click`'s config overrides.
1917
1918 - `defer_loading: optional boolean or null`
1919
1920 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1921
1922 - `enabled: optional boolean or null`
1923
1924 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1925
1926 - `screenshot: optional BetaBrowserScreenshotConfig or null`
1927
1928 `screenshot`'s config overrides.
1929
1930 - `defer_loading: optional boolean or null`
1931
1932 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1933
1934 - `enabled: optional boolean or null`
1935
1936 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1937
1938 - `scroll: optional BetaBrowserScrollConfig or null`
1939
1940 `scroll`'s config overrides.
1941
1942 - `defer_loading: optional boolean or null`
1943
1944 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1945
1946 - `enabled: optional boolean or null`
1947
1948 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1949
1950 - `scroll_to: optional BetaBrowserScrollToConfig or null`
1951
1952 `scroll_to`'s config overrides.
1953
1954 - `defer_loading: optional boolean or null`
1955
1956 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1957
1958 - `enabled: optional boolean or null`
1959
1960 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1961
1962 - `switch_tab: optional BetaBrowserSwitchTabConfig or null`
1963
1964 `switch_tab`'s config overrides.
1965
1966 - `defer_loading: optional boolean or null`
1967
1968 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1969
1970 - `enabled: optional boolean or null`
1971
1972 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1973
1974 - `triple_click: optional BetaBrowserTripleClickConfig or null`
1975
1976 `triple_click`'s config overrides.
1977
1978 - `defer_loading: optional boolean or null`
1979
1980 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1981
1982 - `enabled: optional boolean or null`
1983
1984 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1985
1986 - `wait: optional BetaBrowserWaitConfig or null`
1987
1988 `wait`'s config overrides.
1989
1990 - `defer_loading: optional boolean or null`
1991
1992 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
1993
1994 - `enabled: optional boolean or null`
1995
1996 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
1997
1998 - `zoom: optional BetaBrowserZoomConfig or null`
1999
2000 `zoom`'s config overrides.
2001
2002 - `defer_loading: optional boolean or null`
2003
2004 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2005
2006 - `enabled: optional boolean or null`
2007
2008 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2009
2010 - `BetaToolComputerUse20241022 object`
2011
2012 - `type: "computer_20241022"`
2013
2014 - `display_height_px: number`
2015
2016 The height of the display in pixels.
2017
2018 minimum: 1
2019
2020 - `display_width_px: number`
2021
2022 The width of the display in pixels.
2023
2024 minimum: 1
2025
2026 - `name: "computer"`
2027
2028 Name of the tool.
2029
2030 This is how the tool will be called by the model and in `tool_use` blocks.
2031
2032 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2033
2034 - `"direct"`
2035
2036 - `"code_execution_20250825"`
2037
2038 - `"code_execution_20260120"`
2039
2040 - `"code_execution_20260521"`
2041
2042 - `cache_control: optional BetaCacheControlEphemeral or null`
2043
2044 Create a cache control breakpoint at this content block.
2045
2046 - `defer_loading: optional boolean`
2047
2048 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2049
2050 - `display_number: optional number or null`
2051
2052 The X11 display number (e.g. 0, 1) for the display.
2053
2054 minimum: 0
2055
2056 - `input_examples: optional array of map[unknown]`
2057
2058 - `strict: optional boolean`
2059
2060 When true, guarantees schema validation on tool names and inputs
2061
2062 - `BetaMemoryTool20250818 object`
2063
2064 - `type: "memory_20250818"`
2065
2066 - `name: "memory"`
2067
2068 Name of the tool.
2069
2070 This is how the tool will be called by the model and in `tool_use` blocks.
2071
2072 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2073
2074 - `"direct"`
2075
2076 - `"code_execution_20250825"`
2077
2078 - `"code_execution_20260120"`
2079
2080 - `"code_execution_20260521"`
2081
2082 - `cache_control: optional BetaCacheControlEphemeral or null`
2083
2084 Create a cache control breakpoint at this content block.
2085
2086 - `defer_loading: optional boolean`
2087
2088 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2089
2090 - `input_examples: optional array of map[unknown]`
2091
2092 - `strict: optional boolean`
2093
2094 When true, guarantees schema validation on tool names and inputs
2095
2096 - `BetaToolComputerUse20250124 object`
2097
2098 - `type: "computer_20250124"`
2099
2100 - `display_height_px: number`
2101
2102 The height of the display in pixels.
2103
2104 minimum: 1
2105
2106 - `display_width_px: number`
2107
2108 The width of the display in pixels.
2109
2110 minimum: 1
2111
2112 - `name: "computer"`
2113
2114 Name of the tool.
2115
2116 This is how the tool will be called by the model and in `tool_use` blocks.
2117
2118 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2119
2120 - `"direct"`
2121
2122 - `"code_execution_20250825"`
2123
2124 - `"code_execution_20260120"`
2125
2126 - `"code_execution_20260521"`
2127
2128 - `cache_control: optional BetaCacheControlEphemeral or null`
2129
2130 Create a cache control breakpoint at this content block.
2131
2132 - `defer_loading: optional boolean`
2133
2134 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2135
2136 - `display_number: optional number or null`
2137
2138 The X11 display number (e.g. 0, 1) for the display.
2139
2140 minimum: 0
2141
2142 - `input_examples: optional array of map[unknown]`
2143
2144 - `strict: optional boolean`
2145
2146 When true, guarantees schema validation on tool names and inputs
2147
2148 - `BetaToolTextEditor20241022 object`
2149
2150 - `type: "text_editor_20241022"`
2151
2152 - `name: "str_replace_editor"`
2153
2154 Name of the tool.
2155
2156 This is how the tool will be called by the model and in `tool_use` blocks.
2157
2158 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2159
2160 - `"direct"`
2161
2162 - `"code_execution_20250825"`
2163
2164 - `"code_execution_20260120"`
2165
2166 - `"code_execution_20260521"`
2167
2168 - `cache_control: optional BetaCacheControlEphemeral or null`
2169
2170 Create a cache control breakpoint at this content block.
2171
2172 - `defer_loading: optional boolean`
2173
2174 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2175
2176 - `input_examples: optional array of map[unknown]`
2177
2178 - `strict: optional boolean`
2179
2180 When true, guarantees schema validation on tool names and inputs
2181
2182 - `BetaToolComputerUse20251124 object`
2183
2184 - `type: "computer_20251124"`
2185
2186 - `display_height_px: number`
2187
2188 The height of the display in pixels.
2189
2190 minimum: 1
2191
2192 - `display_width_px: number`
2193
2194 The width of the display in pixels.
2195
2196 minimum: 1
2197
2198 - `name: "computer"`
2199
2200 Name of the tool.
2201
2202 This is how the tool will be called by the model and in `tool_use` blocks.
2203
2204 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2205
2206 - `"direct"`
2207
2208 - `"code_execution_20250825"`
2209
2210 - `"code_execution_20260120"`
2211
2212 - `"code_execution_20260521"`
2213
2214 - `cache_control: optional BetaCacheControlEphemeral or null`
2215
2216 Create a cache control breakpoint at this content block.
2217
2218 - `defer_loading: optional boolean`
2219
2220 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2221
2222 - `display_number: optional number or null`
2223
2224 The X11 display number (e.g. 0, 1) for the display.
2225
2226 minimum: 0
2227
2228 - `enable_zoom: optional boolean`
2229
2230 Whether to enable an action to take a zoomed-in screenshot of the screen.
2231
2232 - `input_examples: optional array of map[unknown]`
2233
2234 - `strict: optional boolean`
2235
2236 When true, guarantees schema validation on tool names and inputs
2237
2238 - `BetaComputerToolset20260801 object`
2239
2240 The computer toolset: a single `tools[]` entry (carrying no
2241 `name`) that declares the computer tool family. The model is
2242 served the family's tool with any members disabled via `configs`
2243 removed from its schema. Every member is enabled by default, zoom
2244 included. The single-tool options `display_number` and
2245 `enable_zoom` are not fields of a toolset entry — it carries only
2246 `type`, `configs`, and `cache_control`; zoom is controlled
2247 via `configs.zoom.enabled`.
2248
2249 - `type: "computer_toolset_20260801"`
2250
2251 - `cache_control: optional BetaCacheControlEphemeral or null`
2252
2253 Create a cache control breakpoint at this content block.
2254
2255 - `configs: optional BetaComputerToolsetConfigs or null`
2256
2257 Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent.
2258
2259 - `type: optional BetaComputerTypeConfig or null`
2260
2261 `type`'s config overrides.
2262
2263 - `defer_loading: optional boolean or null`
2264
2265 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2266
2267 - `enabled: optional boolean or null`
2268
2269 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2270
2271 - `cursor_position: optional BetaComputerCursorPositionConfig or null`
2272
2273 `cursor_position`'s config overrides.
2274
2275 - `defer_loading: optional boolean or null`
2276
2277 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2278
2279 - `enabled: optional boolean or null`
2280
2281 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2282
2283 - `double_click: optional BetaComputerDoubleClickConfig or null`
2284
2285 `double_click`'s config overrides.
2286
2287 - `defer_loading: optional boolean or null`
2288
2289 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2290
2291 - `enabled: optional boolean or null`
2292
2293 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2294
2295 - `hold_key: optional BetaComputerHoldKeyConfig or null`
2296
2297 `hold_key`'s config overrides.
2298
2299 - `defer_loading: optional boolean or null`
2300
2301 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2302
2303 - `enabled: optional boolean or null`
2304
2305 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2306
2307 - `key: optional BetaComputerKeyConfig or null`
2308
2309 `key`'s config overrides.
2310
2311 - `defer_loading: optional boolean or null`
2312
2313 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2314
2315 - `enabled: optional boolean or null`
2316
2317 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2318
2319 - `left_click: optional BetaComputerLeftClickConfig or null`
2320
2321 `left_click`'s config overrides.
2322
2323 - `defer_loading: optional boolean or null`
2324
2325 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2326
2327 - `enabled: optional boolean or null`
2328
2329 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2330
2331 - `left_click_drag: optional BetaComputerLeftClickDragConfig or null`
2332
2333 `left_click_drag`'s config overrides.
2334
2335 - `defer_loading: optional boolean or null`
2336
2337 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2338
2339 - `enabled: optional boolean or null`
2340
2341 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2342
2343 - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null`
2344
2345 `left_mouse_down`'s config overrides.
2346
2347 - `defer_loading: optional boolean or null`
2348
2349 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2350
2351 - `enabled: optional boolean or null`
2352
2353 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2354
2355 - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null`
2356
2357 `left_mouse_up`'s config overrides.
2358
2359 - `defer_loading: optional boolean or null`
2360
2361 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2362
2363 - `enabled: optional boolean or null`
2364
2365 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2366
2367 - `middle_click: optional BetaComputerMiddleClickConfig or null`
2368
2369 `middle_click`'s config overrides.
2370
2371 - `defer_loading: optional boolean or null`
2372
2373 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2374
2375 - `enabled: optional boolean or null`
2376
2377 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2378
2379 - `mouse_move: optional BetaComputerMouseMoveConfig or null`
2380
2381 `mouse_move`'s config overrides.
2382
2383 - `defer_loading: optional boolean or null`
2384
2385 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2386
2387 - `enabled: optional boolean or null`
2388
2389 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2390
2391 - `right_click: optional BetaComputerRightClickConfig or null`
2392
2393 `right_click`'s config overrides.
2394
2395 - `defer_loading: optional boolean or null`
2396
2397 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2398
2399 - `enabled: optional boolean or null`
2400
2401 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2402
2403 - `screenshot: optional BetaComputerScreenshotConfig or null`
2404
2405 `screenshot`'s config overrides.
2406
2407 - `defer_loading: optional boolean or null`
2408
2409 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2410
2411 - `enabled: optional boolean or null`
2412
2413 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2414
2415 - `scroll: optional BetaComputerScrollConfig or null`
2416
2417 `scroll`'s config overrides.
2418
2419 - `defer_loading: optional boolean or null`
2420
2421 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2422
2423 - `enabled: optional boolean or null`
2424
2425 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2426
2427 - `triple_click: optional BetaComputerTripleClickConfig or null`
2428
2429 `triple_click`'s config overrides.
2430
2431 - `defer_loading: optional boolean or null`
2432
2433 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2434
2435 - `enabled: optional boolean or null`
2436
2437 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2438
2439 - `wait: optional BetaComputerWaitConfig or null`
2440
2441 `wait`'s config overrides.
2442
2443 - `defer_loading: optional boolean or null`
2444
2445 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2446
2447 - `enabled: optional boolean or null`
2448
2449 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2450
2451 - `zoom: optional BetaComputerZoomConfig or null`
2452
2453 `zoom`'s config overrides.
2454
2455 - `defer_loading: optional boolean or null`
2456
2457 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
2458
2459 - `enabled: optional boolean or null`
2460
2461 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
2462
2463 - `BetaToolTextEditor20250124 object`
2464
2465 - `type: "text_editor_20250124"`
2466
2467 - `name: "str_replace_editor"`
2468
2469 Name of the tool.
2470
2471 This is how the tool will be called by the model and in `tool_use` blocks.
2472
2473 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2474
2475 - `"direct"`
2476
2477 - `"code_execution_20250825"`
2478
2479 - `"code_execution_20260120"`
2480
2481 - `"code_execution_20260521"`
2482
2483 - `cache_control: optional BetaCacheControlEphemeral or null`
2484
2485 Create a cache control breakpoint at this content block.
2486
2487 - `defer_loading: optional boolean`
2488
2489 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2490
2491 - `input_examples: optional array of map[unknown]`
2492
2493 - `strict: optional boolean`
2494
2495 When true, guarantees schema validation on tool names and inputs
2496
2497 - `BetaToolTextEditor20250429 object`
2498
2499 - `type: "text_editor_20250429"`
2500
2501 - `name: "str_replace_based_edit_tool"`
2502
2503 Name of the tool.
2504
2505 This is how the tool will be called by the model and in `tool_use` blocks.
2506
2507 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2508
2509 - `"direct"`
2510
2511 - `"code_execution_20250825"`
2512
2513 - `"code_execution_20260120"`
2514
2515 - `"code_execution_20260521"`
2516
2517 - `cache_control: optional BetaCacheControlEphemeral or null`
2518
2519 Create a cache control breakpoint at this content block.
2520
2521 - `defer_loading: optional boolean`
2522
2523 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2524
2525 - `input_examples: optional array of map[unknown]`
2526
2527 - `strict: optional boolean`
2528
2529 When true, guarantees schema validation on tool names and inputs
2530
2531 - `BetaToolTextEditor20250728 object`
2532
2533 - `type: "text_editor_20250728"`
2534
2535 - `name: "str_replace_based_edit_tool"`
2536
2537 Name of the tool.
2538
2539 This is how the tool will be called by the model and in `tool_use` blocks.
2540
2541 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2542
2543 - `"direct"`
2544
2545 - `"code_execution_20250825"`
2546
2547 - `"code_execution_20260120"`
2548
2549 - `"code_execution_20260521"`
2550
2551 - `cache_control: optional BetaCacheControlEphemeral or null`
2552
2553 Create a cache control breakpoint at this content block.
2554
2555 - `defer_loading: optional boolean`
2556
2557 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2558
2559 - `input_examples: optional array of map[unknown]`
2560
2561 - `max_characters: optional number or null`
2562
2563 Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file.
2564
2565 minimum: 1
2566
2567 - `strict: optional boolean`
2568
2569 When true, guarantees schema validation on tool names and inputs
2570
2571 - `BetaWebSearchTool20250305 object`
2572
2573 - `type: "web_search_20250305"`
2574
2575 - `name: "web_search"`
2576
2577 Name of the tool.
2578
2579 This is how the tool will be called by the model and in `tool_use` blocks.
2580
2581 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2582
2583 - `"direct"`
2584
2585 - `"code_execution_20250825"`
2586
2587 - `"code_execution_20260120"`
2588
2589 - `"code_execution_20260521"`
2590
2591 - `allowed_domains: optional array of string or null`
2592
2593 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.
2594
2595 - `blocked_domains: optional array of string or null`
2596
2597 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.
2598
2599 - `cache_control: optional BetaCacheControlEphemeral or null`
2600
2601 Create a cache control breakpoint at this content block.
2602
2603 - `defer_loading: optional boolean`
2604
2605 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2606
2607 - `max_uses: optional number or null`
2608
2609 Maximum number of times the tool can be used in the API request.
2610
2611 minimum: 1
2612
2613 - `strict: optional boolean`
2614
2615 When true, guarantees schema validation on tool names and inputs
2616
2617 - `user_location: optional BetaUserLocation or null`
2618
2619 Parameters for the user's location. Used to provide more relevant search results.
2620
2621 - `type: "approximate"`
2622
2623 - `city: optional string or null`
2624
2625 The city of the user.
2626
2627 minLength: 1, maxLength: 255
2628
2629 - `country: optional string or null`
2630
2631 The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user.
2632
2633 minLength: 2, maxLength: 2
2634
2635 - `region: optional string or null`
2636
2637 The region of the user.
2638
2639 minLength: 1, maxLength: 255
2640
2641 - `timezone: optional string or null`
2642
2643 The [IANA timezone](https://nodatime.org/TimeZones) of the user.
2644
2645 minLength: 1, maxLength: 255
2646
2647 - `BetaWebFetchTool20250910 object`
2648
2649 - `type: "web_fetch_20250910"`
2650
2651 - `name: "web_fetch"`
2652
2653 Name of the tool.
2654
2655 This is how the tool will be called by the model and in `tool_use` blocks.
2656
2657 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2658
2659 - `"direct"`
2660
2661 - `"code_execution_20250825"`
2662
2663 - `"code_execution_20260120"`
2664
2665 - `"code_execution_20260521"`
2666
2667 - `allowed_domains: optional array of string or null`
2668
2669 List of domains to allow fetching from
2670
2671 - `blocked_domains: optional array of string or null`
2672
2673 List of domains to block fetching from
2674
2675 - `cache_control: optional BetaCacheControlEphemeral or null`
2676
2677 Create a cache control breakpoint at this content block.
2678
2679 - `citations: optional BetaCitationsConfigParam or null`
2680
2681 Citations configuration for fetched documents. Citations are disabled by default.
2682
2683 - `defer_loading: optional boolean`
2684
2685 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2686
2687 - `max_content_tokens: optional number or null`
2688
2689 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
2690
2691 minimum: 1
2692
2693 - `max_uses: optional number or null`
2694
2695 Maximum number of times the tool can be used in the API request.
2696
2697 minimum: 1
2698
2699 - `strict: optional boolean`
2700
2701 When true, guarantees schema validation on tool names and inputs
2702
2703 - `url_sources: optional BetaWebFetchURLSources or null`
2704
2705 Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
2706
2707 - `client_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
2708
2709 Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].
2710
2711 - `BetaWebFetchURLSourceAll object`
2712
2713 The `url_sources` variant under which a source contributes in
2714 full: every result of the tool filter's source, or all user input.
2715
2716 - `type: "all"`
2717
2718 - `BetaWebFetchURLSourceNone object`
2719
2720 The `url_sources` variant under which a source contributes nothing:
2721 no result of the tool filter's source, or no user input.
2722
2723 - `type: "none"`
2724
2725 - `BetaWebFetchURLSourceOnly object`
2726
2727 The tool filter variant under which only the named tools' results
2728 contribute.
2729
2730 - `type: "only"`
2731
2732 - `tools: array of BetaWebFetchURLSourceToolReference`
2733
2734 - `type: "tool_reference"`
2735
2736 - `name: string`
2737
2738 - `BetaWebFetchURLSourceExcept object`
2739
2740 The tool filter variant under which every result but the named
2741 tools' contributes.
2742
2743 - `type: "except"`
2744
2745 - `tools: array of BetaWebFetchURLSourceToolReference`
2746
2747 - `type: "tool_reference"`
2748
2749 - `name: string`
2750
2751 - `server_tool_results: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone or BetaWebFetchURLSourceOnly or BetaWebFetchURLSourceExcept`
2752
2753 Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.
2754
2755 - `BetaWebFetchURLSourceAll object`
2756
2757 The `url_sources` variant under which a source contributes in
2758 full: every result of the tool filter's source, or all user input.
2759
2760 - `BetaWebFetchURLSourceNone object`
2761
2762 The `url_sources` variant under which a source contributes nothing:
2763 no result of the tool filter's source, or no user input.
2764
2765 - `BetaWebFetchURLSourceOnly object`
2766
2767 The tool filter variant under which only the named tools' results
2768 contribute.
2769
2770 - `BetaWebFetchURLSourceExcept object`
2771
2772 The tool filter variant under which every result but the named
2773 tools' contributes.
2774
2775 - `user_input: optional BetaWebFetchURLSourceAll or BetaWebFetchURLSourceNone`
2776
2777 Whether URLs in user messages are fetchable: "all" or "none".
2778
2779 - `BetaWebFetchURLSourceAll object`
2780
2781 The `url_sources` variant under which a source contributes in
2782 full: every result of the tool filter's source, or all user input.
2783
2784 - `BetaWebFetchURLSourceNone object`
2785
2786 The `url_sources` variant under which a source contributes nothing:
2787 no result of the tool filter's source, or no user input.
2788
2789 - `BetaWebSearchTool20260209 object`
2790
2791 - `type: "web_search_20260209"`
2792
2793 - `name: "web_search"`
2794
2795 Name of the tool.
2796
2797 This is how the tool will be called by the model and in `tool_use` blocks.
2798
2799 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2800
2801 - `"direct"`
2802
2803 - `"code_execution_20250825"`
2804
2805 - `"code_execution_20260120"`
2806
2807 - `"code_execution_20260521"`
2808
2809 - `allowed_domains: optional array of string or null`
2810
2811 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.
2812
2813 - `blocked_domains: optional array of string or null`
2814
2815 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.
2816
2817 - `cache_control: optional BetaCacheControlEphemeral or null`
2818
2819 Create a cache control breakpoint at this content block.
2820
2821 - `defer_loading: optional boolean`
2822
2823 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2824
2825 - `max_uses: optional number or null`
2826
2827 Maximum number of times the tool can be used in the API request.
2828
2829 minimum: 1
2830
2831 - `strict: optional boolean`
2832
2833 When true, guarantees schema validation on tool names and inputs
2834
2835 - `user_location: optional BetaUserLocation or null`
2836
2837 Parameters for the user's location. Used to provide more relevant search results.
2838
2839 - `BetaWebFetchTool20260209 object`
2840
2841 - `type: "web_fetch_20260209"`
2842
2843 - `name: "web_fetch"`
2844
2845 Name of the tool.
2846
2847 This is how the tool will be called by the model and in `tool_use` blocks.
2848
2849 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2850
2851 - `"direct"`
2852
2853 - `"code_execution_20250825"`
2854
2855 - `"code_execution_20260120"`
2856
2857 - `"code_execution_20260521"`
2858
2859 - `allowed_domains: optional array of string or null`
2860
2861 List of domains to allow fetching from
2862
2863 - `blocked_domains: optional array of string or null`
2864
2865 List of domains to block fetching from
2866
2867 - `cache_control: optional BetaCacheControlEphemeral or null`
2868
2869 Create a cache control breakpoint at this content block.
2870
2871 - `citations: optional BetaCitationsConfigParam or null`
2872
2873 Citations configuration for fetched documents. Citations are disabled by default.
2874
2875 - `defer_loading: optional boolean`
2876
2877 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2878
2879 - `max_content_tokens: optional number or null`
2880
2881 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
2882
2883 minimum: 1
2884
2885 - `max_uses: optional number or null`
2886
2887 Maximum number of times the tool can be used in the API request.
2888
2889 minimum: 1
2890
2891 - `strict: optional boolean`
2892
2893 When true, guarantees schema validation on tool names and inputs
2894
2895 - `url_sources: optional BetaWebFetchURLSources or null`
2896
2897 Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
2898
2899 - `BetaWebFetchTool20260309 object`
2900
2901 Web fetch tool with use_cache parameter for bypassing cached content.
2902
2903 - `type: "web_fetch_20260309"`
2904
2905 - `name: "web_fetch"`
2906
2907 Name of the tool.
2908
2909 This is how the tool will be called by the model and in `tool_use` blocks.
2910
2911 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2912
2913 - `"direct"`
2914
2915 - `"code_execution_20250825"`
2916
2917 - `"code_execution_20260120"`
2918
2919 - `"code_execution_20260521"`
2920
2921 - `allowed_domains: optional array of string or null`
2922
2923 List of domains to allow fetching from
2924
2925 - `blocked_domains: optional array of string or null`
2926
2927 List of domains to block fetching from
2928
2929 - `cache_control: optional BetaCacheControlEphemeral or null`
2930
2931 Create a cache control breakpoint at this content block.
2932
2933 - `citations: optional BetaCitationsConfigParam or null`
2934
2935 Citations configuration for fetched documents. Citations are disabled by default.
2936
2937 - `defer_loading: optional boolean`
2938
2939 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
2940
2941 - `max_content_tokens: optional number or null`
2942
2943 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
2944
2945 minimum: 1
2946
2947 - `max_uses: optional number or null`
2948
2949 Maximum number of times the tool can be used in the API request.
2950
2951 minimum: 1
2952
2953 - `strict: optional boolean`
2954
2955 When true, guarantees schema validation on tool names and inputs
2956
2957 - `url_sources: optional BetaWebFetchURLSources or null`
2958
2959 Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
2960
2961 - `use_cache: optional boolean`
2962
2963 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
2964
2965 - `BetaWebSearchTool20260318 object`
2966
2967 - `type: "web_search_20260318"`
2968
2969 - `name: "web_search"`
2970
2971 Name of the tool.
2972
2973 This is how the tool will be called by the model and in `tool_use` blocks.
2974
2975 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
2976
2977 - `"direct"`
2978
2979 - `"code_execution_20250825"`
2980
2981 - `"code_execution_20260120"`
2982
2983 - `"code_execution_20260521"`
2984
2985 - `allowed_domains: optional array of string or null`
2986
2987 If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.
2988
2989 - `blocked_domains: optional array of string or null`
2990
2991 If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.
2992
2993 - `cache_control: optional BetaCacheControlEphemeral or null`
2994
2995 Create a cache control breakpoint at this content block.
2996
2997 - `defer_loading: optional boolean`
2998
2999 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3000
3001 - `max_uses: optional number or null`
3002
3003 Maximum number of times the tool can be used in the API request.
3004
3005 minimum: 1
3006
3007 - `response_inclusion: optional "full" or "excluded"`
3008
3009 How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
3010
3011 - `"full"`
3012
3013 - `"excluded"`
3014
3015 - `strict: optional boolean`
3016
3017 When true, guarantees schema validation on tool names and inputs
3018
3019 - `user_location: optional BetaUserLocation or null`
3020
3021 Parameters for the user's location. Used to provide more relevant search results.
3022
3023 - `BetaWebFetchTool20260318 object`
3024
3025 - `type: "web_fetch_20260318"`
3026
3027 - `name: "web_fetch"`
3028
3029 Name of the tool.
3030
3031 This is how the tool will be called by the model and in `tool_use` blocks.
3032
3033 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
3034
3035 - `"direct"`
3036
3037 - `"code_execution_20250825"`
3038
3039 - `"code_execution_20260120"`
3040
3041 - `"code_execution_20260521"`
3042
3043 - `allowed_domains: optional array of string or null`
3044
3045 List of domains to allow fetching from
3046
3047 - `blocked_domains: optional array of string or null`
3048
3049 List of domains to block fetching from
3050
3051 - `cache_control: optional BetaCacheControlEphemeral or null`
3052
3053 Create a cache control breakpoint at this content block.
3054
3055 - `citations: optional BetaCitationsConfigParam or null`
3056
3057 Citations configuration for fetched documents. Citations are disabled by default.
3058
3059 - `defer_loading: optional boolean`
3060
3061 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3062
3063 - `max_content_tokens: optional number or null`
3064
3065 Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
3066
3067 minimum: 1
3068
3069 - `max_uses: optional number or null`
3070
3071 Maximum number of times the tool can be used in the API request.
3072
3073 minimum: 1
3074
3075 - `response_inclusion: optional "full" or "excluded"`
3076
3077 How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
3078
3079 - `"full"`
3080
3081 - `"excluded"`
3082
3083 - `strict: optional boolean`
3084
3085 When true, guarantees schema validation on tool names and inputs
3086
3087 - `url_sources: optional BetaWebFetchURLSources or null`
3088
3089 Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
3090
3091 - `use_cache: optional boolean`
3092
3093 Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
3094
3095 - `BetaAdvisorTool20260301 object`
3096
3097 - `type: "advisor_20260301"`
3098
3099 - `model: Model`
3100
3101 The model that will complete your prompt.
3102
3103 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
3104
3105 - `"claude-haiku-5-5"`
3106
3107 Fastest model for high-volume, real-time tasks
3108
3109 - `"claude-sonnet-5-5"`
3110
3111 Efficient model for coding and agents
3112
3113 - `"claude-fable-5-1"`
3114
3115 Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows
3116
3117 - `"claude-opus-5-5"`
3118
3119 Powerful intelligence for coding, knowledge work, and long-running agents
3120
3121 - `"claude-mythos-5-1"`
3122
3123 Our most capable model for cybersecurity and biology research, available through trusted access programs
3124
3125 - `"claude-sonnet-5"`
3126
3127 Efficient model for coding and agents
3128
3129 - `"claude-fable-5"`
3130
3131 Next generation of intelligence for the hardest knowledge work and coding problems
3132
3133 - `"claude-mythos-5"`
3134
3135 Most capable model for cybersecurity and biology research
3136
3137 - `"claude-opus-5"`
3138
3139 Powerful intelligence for long-running agents and coding
3140
3141 - `"claude-opus-4-8"`
3142
3143 Powerful intelligence for long-running agents and coding
3144
3145 - `"claude-opus-4-7"`
3146
3147 Powerful intelligence for long-running agents and coding
3148
3149 - `"claude-opus-4-6"`
3150
3151 Powerful intelligence for long-running agents and coding
3152
3153 - `"claude-sonnet-4-6"`
3154
3155 Best combination of speed and intelligence
3156
3157 - `"claude-haiku-4-5"`
3158
3159 - `"claude-haiku-4-5-20251001"`
3160
3161 - `"claude-opus-4-5"`
3162
3163 Powerful intelligence for long-running agents and coding
3164
3165 - `"claude-opus-4-5-20251101"`
3166
3167 Powerful intelligence for long-running agents and coding
3168
3169 - `"claude-mythos-preview"`
3170
3171 **Deprecated**: Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.
3172
3173 New class of intelligence, strongest in coding and cybersecurity
3174
3175 - `"claude-sonnet-4-5"`
3176
3177 **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.
3178
3179 High-performance model for agents and coding
3180
3181 - `"claude-sonnet-4-5-20250929"`
3182
3183 **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.
3184
3185 High-performance model for agents and coding
3186
3187 - `string`
3188
3189 - `name: "advisor"`
3190
3191 Name of the tool.
3192
3193 This is how the tool will be called by the model and in `tool_use` blocks.
3194
3195 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
3196
3197 - `"direct"`
3198
3199 - `"code_execution_20250825"`
3200
3201 - `"code_execution_20260120"`
3202
3203 - `"code_execution_20260521"`
3204
3205 - `cache_control: optional BetaCacheControlEphemeral or null`
3206
3207 Create a cache control breakpoint at this content block.
3208
3209 - `caching: optional BetaCacheControlEphemeral or null`
3210
3211 Caching for the advisor's own prompt. When set, each advisor call writes a cache entry at the given TTL so subsequent calls in the same conversation read the stable prefix. When omitted, the advisor prompt is not cached.
3212
3213 - `defer_loading: optional boolean`
3214
3215 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3216
3217 - `max_tokens: optional number or null`
3218
3219 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the server also emits a remaining-tokens budget block in the advisor's prompt so the advisor self-shapes toward the cap. When omitted, the advisor model's default output cap applies and no budget block is emitted.
3220
3221 minimum: 1024
3222
3223 - `max_uses: optional number or null`
3224
3225 Maximum number of times the tool can be used in the API request.
3226
3227 minimum: 1
3228
3229 - `strict: optional boolean`
3230
3231 When true, guarantees schema validation on tool names and inputs
3232
3233 - `BetaToolSearchToolBm25_20251119 object`
3234
3235 - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"`
3236
3237 - `"tool_search_tool_bm25_20251119"`
3238
3239 - `"tool_search_tool_bm25"`
3240
3241 - `name: "tool_search_tool_bm25"`
3242
3243 Name of the tool.
3244
3245 This is how the tool will be called by the model and in `tool_use` blocks.
3246
3247 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
3248
3249 - `"direct"`
3250
3251 - `"code_execution_20250825"`
3252
3253 - `"code_execution_20260120"`
3254
3255 - `"code_execution_20260521"`
3256
3257 - `cache_control: optional BetaCacheControlEphemeral or null`
3258
3259 Create a cache control breakpoint at this content block.
3260
3261 - `defer_loading: optional boolean`
3262
3263 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3264
3265 - `strict: optional boolean`
3266
3267 When true, guarantees schema validation on tool names and inputs
3268
3269 - `BetaToolSearchToolRegex20251119 object`
3270
3271 - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"`
3272
3273 - `"tool_search_tool_regex_20251119"`
3274
3275 - `"tool_search_tool_regex"`
3276
3277 - `name: "tool_search_tool_regex"`
3278
3279 Name of the tool.
3280
3281 This is how the tool will be called by the model and in `tool_use` blocks.
3282
3283 - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"`
3284
3285 - `"direct"`
3286
3287 - `"code_execution_20250825"`
3288
3289 - `"code_execution_20260120"`
3290
3291 - `"code_execution_20260521"`
3292
3293 - `cache_control: optional BetaCacheControlEphemeral or null`
3294
3295 Create a cache control breakpoint at this content block.
3296
3297 - `defer_loading: optional boolean`
3298
3299 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
3300
3301 - `strict: optional boolean`
3302
3303 When true, guarantees schema validation on tool names and inputs
3304
3305 - `BetaMCPToolset object`
3306
3307 Configuration for a group of tools from an MCP server.
3308
3309 Allows configuring enabled status and defer_loading for all tools
3310 from an MCP server, with optional per-tool overrides.
3311
3312 - `type: "mcp_toolset"`
3313
3314 - `mcp_server_name: string`
3315
3316 Name of the MCP server to configure tools for
3317
3318 minLength: 1, maxLength: 255
3319
3320 - `cache_control: optional BetaCacheControlEphemeral or null`
3321
3322 Create a cache control breakpoint at this content block.
3323
3324 - `configs: optional map[BetaMCPToolConfig] or null`
3325
3326 Configuration overrides for specific tools, keyed by tool name
3327
3328 - `defer_loading: optional boolean`
3329
3330 - `enabled: optional boolean`
3331
3332 - `default_config: optional BetaMCPToolDefaultConfig`
3333
3334 Default configuration applied to all tools from this server
3335
3336 - `defer_loading: optional boolean`
3337
3338 - `enabled: optional boolean`
3339
3340 - `tools: optional array of BetaMCPToolParam or null`
3341
3342 The server's tool listing, pinned: when present, the server is not asked for its tools before sampling and exactly these entries, with `default_config` and `configs` applied, are the toolset's tools. Copy it from the `mcp_tool_listing` block of an earlier response.
3343
3344 - `input_schema: map[unknown]`
3345
3346 The tool's input schema as the MCP server lists it, verbatim.
3347
3348 - `name: string`
3349
3350 The tool's name as the MCP server lists it (not prefixed with the server name).
3351
3352 minLength: 1
3353
3354 - `description: optional string or null`
3355
3356 The tool's description as the MCP server lists it.
3357
3358 - `cache_control: optional BetaCacheControlEphemeral or null`
3359
3360 Create a cache control breakpoint at this content block.
3361
3362 - `BetaRequestToolRemovalBlock object`
3363
3364 Mid-conversation directive to withdraw a tool.
3365
3366 `tool` references a tool (or MCP toolset) by name: one declared in the
3367 request's `tools` or defined earlier in `messages`. It is no longer
3368 offered to the model from this point in the conversation onward.
3369
3370 - `type: "tool_removal"`
3371
3372 - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference`
3373
3374 - `BetaToolChangeToolReference object`
3375
3376 Reference to a single tool, by the name the model uses to call it: a
3377 tool declared in `tools` or defined by an earlier `tool_addition`
3378 block. Does not accept the composed `{server}_{name}` form the server
3379 assigns to MCP-resolved tools; use `mcp_tool_reference` or
3380 `mcp_toolset_reference` for those.
3381
3382 - `BetaToolChangeMCPToolReference object`
3383
3384 Reference to a single MCP tool by its server and remote name; the
3385 same `server_name`/`name` pair `mcp_tool_use` carries.
3386
3387 - `BetaToolChangeMCPToolsetReference object`
3388
3389 Reference to every tool in the named MCP server's toolset.
3390
3391 - `cache_control: optional BetaCacheControlEphemeral or null`
3392
3393 Create a cache control breakpoint at this content block.
3394
3395 - `BetaRequestToolAdditionBlock object`
3396
3397 Mid-conversation directive to make a tool available.
3398
3399 `tool` is a reference to a tool (or MCP toolset) declared in the
3400 request's `tools`. Under the `inline-tools-2026-09-15` beta it may
3401 instead be a reference to a tool defined earlier in `messages`, or a
3402 `tool_definition` object that carries an inline tool definition in
3403 `definition` (the same object a `tools` entry holds). An `mcp_toolset`
3404 definition also requires the `mcp-client-2026-09-15` beta. The tool is
3405 offered to the model from this point in the conversation onward.
3406
3407 - `BetaRequestToolRemovalBlock object`
3408
3409 Mid-conversation directive to withdraw a tool.
3410
3411 `tool` references a tool (or MCP toolset) by name: one declared in the
3412 request's `tools` or defined earlier in `messages`. It is no longer
3413 offered to the model from this point in the conversation onward.
3414
3415 - `BetaMCPToolListingBlockParam object`
3416
3417 The tool listing an MCP server returned while an earlier response was
3418 produced, as that response carried it. Send the assistant message back
3419 unchanged, this block included, and the server uses this listing for the
3420 matching `mcp_toolset` instead of asking the MCP server again.
3421
3422 - `type: "mcp_tool_listing"`
3423
3424 - `mcp_server_name: string`
3425
3426 The name of the MCP server this listing came from, as `mcp_servers` declares it.
3427
3428 minLength: 1, maxLength: 255
3429
3430 - `tools: array of BetaMCPToolParam`
3431
3432 The server's tools, exactly as the response listed them.
3433
3434 - `input_schema: map[unknown]`
3435
3436 The tool's input schema as the MCP server lists it, verbatim.
3437
3438 - `name: string`
3439
3440 The tool's name as the MCP server lists it (not prefixed with the server name).
3441
3442 minLength: 1
3443
3444 - `description: optional string or null`
3445
3446 The tool's description as the MCP server lists it.
3447
3448 - `BetaFallbackBlockParam object`
3449
3450 A `fallback` block echoed back from a prior response.
3451
3452 Accepted in `messages[].content` and not rendered into the prompt; not
3453 validated against the request's `fallbacks` chain or top-level `model`.
3454
3455 Echo the assistant turn back verbatim, including this block in its
3456 original position. The block marks the boundary between content produced
3457 before and after a fallback hop, and the server relies on that boundary
3458 to validate the turn: when thinking runs flank the boundary, omitting
3459 the block merges them into one span the server cannot validate (the
3460 request is rejected), and moving it into the middle of a single run is
3461 likewise rejected; between non-thinking blocks the block's placement has
3462 no validation effect.
3463
3464 - `type: "fallback"`
3465
3466 - `from: BetaFallbackInfoParam`
3467
3468 Identifies one hop of a fallback transition.
3469
3470 - `model: Model`
3471
3472 The model that will complete your prompt.
3473
3474 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
3475
3476 - `to: BetaFallbackInfoParam`
3477
3478 Identifies one hop of a fallback transition.
3479
3480 - `trigger: optional unknown`
3481
3482 The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed.
3483
3484 - `role: "user" or "assistant" or "system"`
3485
3486 - `"user"`
3487
3488 - `"assistant"`
3489
3490 - `"system"`
3491
3492 - `clear_at: optional "next_user_message" or "never" or null`
3493
3494 How long this system message's text stays in front of the model. `"never"` (the default) renders it on every request that includes it. `"next_user_message"` renders it only for the user turn it follows: once a later `role: "user"` message exists in `messages` the message stays in the array (send it unchanged) but is no longer shown to the model. Only permitted on `role: "system"` messages.
3495
3496 - `"next_user_message"`
3497
3498 - `"never"`
3499
3500 - `output_config: optional BetaSystemMessageOutputConfig or null`
3501
3502 Per-message output configuration on a role:"system" input message.
3503
3504 Fields here apply per-turn; `format` remains top-level only. An
3505 empty `{}` is accepted on a message that carries content; a message
3506 with neither content nor output_config fields is rejected.
3507
3508 - `effort: optional "low" or "medium" or "high" or 2 more or null`
3509
3510 How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.
3511
3512 Valid values are `low`, `medium`, `high`, `xhigh`, or `max`.
3513
3514 - `"low"`
3515
3516 - `"medium"`
3517
3518 - `"high"`
3519
3520 - `"xhigh"`
3521
3522 - `"max"`
3446 - `description: optional string or null`
3447
3448 The tool's description as the MCP server lists it.
3449
3450 - `BetaFallbackBlockParam object`
3451
3452 A `fallback` block echoed back from a prior response.
3453
3454 Accepted in `messages[].content` and not rendered into the prompt; not
3455 validated against the request's `fallbacks` chain or top-level `model`.
3456
3457 Echo the assistant turn back verbatim, including this block in its
3458 original position. The block marks the boundary between content produced
3459 before and after a fallback hop, and the server relies on that boundary
3460 to validate the turn: when thinking runs flank the boundary, omitting
3461 the block merges them into one span the server cannot validate (the
3462 request is rejected), and moving it into the middle of a single run is
3463 likewise rejected; between non-thinking blocks the block's placement has
3464 no validation effect.
3465
3466 - `type: "fallback"`
3467
3468 - `from: BetaFallbackInfoParam`
3469
3470 Identifies one hop of a fallback transition.
3471
3472 - `model: Model`
3473
3474 The model that will complete your prompt.
3475
3476 See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
3477
3478 - `to: BetaFallbackInfoParam`
3479
3480 Identifies one hop of a fallback transition.
3481
3482 - `trigger: optional unknown`
3483
3484 The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed.
3485
3486 - `role: "user"`
3487
3488 - `BetaAssistantMessageParam object`
3489
3490 - `content: BetaMessageContentParam`
3491
3492 - `role: "assistant"`
3493
3494 - `BetaSystemMessageParam object`
3495
3496 - `role: "system"`
3497
3498 - `clear_at: optional "next_user_message" or "never" or null`
3499
3500 How long this system message's text stays in front of the model. `"never"` (the default) renders it on every request that includes it. `"next_user_message"` renders it only for the user turn it follows: once a later `role: "user"` message exists in `messages` the message stays in the array (send it unchanged) but is no longer shown to the model. Only permitted on `role: "system"` messages.
3501
3502 - `"next_user_message"`
3503
3504 - `"never"`
3505
3506 - `content: optional string or array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock`
3507
3508 - `string`
3509
3510 - `Blocks = array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock`
3511
3512 - `BetaTextBlockParam object`
3513
3514 - `BetaRequestToolAdditionBlock object`
3515
3516 Mid-conversation directive to make a tool available.
3517
3518 `tool` is a reference to a tool (or MCP toolset) declared in the
3519 request's `tools`. Under the `inline-tools-2026-09-15` beta it may
3520 instead be a reference to a tool defined earlier in `messages`, or a
3521 `tool_definition` object that carries an inline tool definition in
3522 `definition` (the same object a `tools` entry holds). An `mcp_toolset`
3523 definition also requires the `mcp-client-2026-09-15` beta. The tool is
3524 offered to the model from this point in the conversation onward.
3525
3526 - `BetaRequestToolRemovalBlock object`
3527
3528 Mid-conversation directive to withdraw a tool.
3529
3530 `tool` references a tool (or MCP toolset) by name: one declared in the
3531 request's `tools` or defined earlier in `messages`. It is no longer
3532 offered to the model from this point in the conversation onward.
3533
3534 - `output_config: optional BetaSystemMessageOutputConfig or null`
3535
3536 Per-message output configuration on a role:"system" input message.
3537
3538 Fields here apply per-turn; `format` remains top-level only. An
3539 empty `{}` is accepted on a message that carries content; a message
3540 with neither content nor output_config fields is rejected.
3541
3542 - `effort: optional "low" or "medium" or "high" or 2 more or null`
3543
3544 How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer.
3545
3546 Valid values are `low`, `medium`, `high`, `xhigh`, or `max`.
3547
3548 - `"low"`
3549
3550 - `"medium"`
3551
3552 - `"high"`
3553
3554 - `"xhigh"`
3555
3556 - `"max"`
35233557
35243558- `model: Model`
35253559
from line 4081
40474081```bash
40484082curl https://api.anthropic.com/v1/messages/count_tokens \
40494083 -H 'Content-Type: application/json' \
4050 -H 'anthropic-version: 2023-06-01' \
4051 -H "X-Api-Key: $ANTHROPIC_API_KEY" \
4084 -H 'anthropic-version: 2026-10-21' \
4085 -H "Authorization: Bearer $ANTHROPIC_API_KEY" \
40524086 -d '{
40534087 "messages": [
40544088 {
40554089