> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# 添加工具

POST https://api.elevenlabs.io/v1/convai/tools
Content-Type: application/json

将新工具添加到工作区可用工具中。

Reference: https://elevenlabs.io/docs/api-reference/tools/create

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Body (application/json)

This endpoint expects a ToolRequestModel.

- `tool_config` (ToolRequestModelToolConfig, required) — Configuration for the tool
- `response_mocks` (list of ToolResponseMockConfig-Input, optional, nullable) — 带可选参数条件的模拟响应。按从上到下的顺序评估，首个匹配项生效。

## Response

### 200

成功响应

- `id` (string, required)
- `tool_config` (ToolResponseModelToolConfig, required) — 工具类型
- `access_info` (ResourceAccessInfo, required)
- `usage_stats` (ToolUsageStatsResponseModel, required)
- `response_mocks` (list of ToolResponseMockConfig-Output, optional, nullable) — 带可选参数条件的模拟响应。按从上到下的顺序评估，首个匹配项生效。

## Errors

### 422 Unprocessable Entity Error

验证错误。

- `detail` (list of ValidationError, optional)

## Types

### ToolRequestModelToolConfig

Configuration for the tool

- `type`: `client` (ClientToolConfig)
  - `description` (string, required) — 说明何时应使用该工具及其功能。
  - `name` (string, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `dynamic_variables` (DynamicVariablesConfig, optional) — Configuration for dynamic variables
  - `execution_mode` (enum, optional, default: immediate) — 决定工具的执行时机和方式：'immediate' 会在 LLM 请求时立即执行工具；'post_tool_speech' 会等待智能体说完后再执行；'async' 会在后台运行工具且不阻塞，最适合耗时较长的操作。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `expects_response` (boolean, optional, default: false) — 如果为 true，调用此工具会阻塞对话，直到客户端返回响应并传递给 llm。如果为 false，则不会等待客户端响应，而是继续对话。这适合向用户展示内容而不阻塞对话。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `parameters` (ObjectJsonSchemaProperty-Input, optional, nullable) — 传递给客户端的所有参数的 Schema
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间（秒）。必须介于 1 到 120 秒之间（含），或设为 -1 以无限期等待客户端响应（需要 expects_response）。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。
- `type`: `mcp` (mcp)
- `type`: `system` (SystemToolConfig)
  - `name` (string, required)
  - `params` (ToolRequestModelToolConfigDiscriminatorMappingSystemParams, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `description` (string, optional, default: ) — 说明何时应使用该工具及其功能。留空则使用针对该工具类型优化的默认说明。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间，单位为秒。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。
- `type`: `webhook` (WebhookToolConfig)
  - `api_schema` (WebhookToolApiSchemaConfig-Input, required) — 出站 webhook 的架构，包括参数和 URL 规范。
  - `description` (string, required) — 说明何时应使用该工具及其功能。
  - `name` (string, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `dynamic_variables` (DynamicVariablesConfig, optional) — Configuration for dynamic variables
  - `execution_mode` (enum, optional, default: immediate) — 决定工具的执行时机和方式：'immediate' 会在 LLM 请求时立即执行工具；'post_tool_speech' 会等待智能体说完后再执行；'async' 会在后台运行工具且不阻塞，最适合耗时较长的操作。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `follow_redirects` (boolean, optional, default: false) — 是否解析端点重定向并返回最终响应。会跟随 1 次重定向，并以不带请求体的 GET 请求访问；此工具中配置的任何内容（标头、身份验证、客户端证书）都不会发送到重定向目标。端点和重定向目标均必须使用 HTTPS。不支持 API 集成工具。
  - `follow_redirects_allowed_domains` (list of string, optional) — 重定向可能指向的域名，例如 'test.example.com'。跟随重定向时必填，列表外的目标将被拒绝。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间，单位为秒。必须介于 5 秒和 300 秒之间（含）。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。

### ToolResponseMockConfig-Input

- `mock_result` (string, required) — 此模拟处于启用状态时，LLM 看到的返回值。
- `parameter_conditions` (list of UnitTestToolCallParameter, optional) — 如果列表为空，模拟将始终启用。
- `is_error` (boolean, optional, default: false) — 如果为 true，模拟结果将作为工具错误而非成功结果提供给 LLM。

### ToolResponseModelToolConfig

工具类型

- `type`: `client` (ClientToolConfig)
  - `description` (string, required) — 说明何时应使用该工具及其功能。
  - `name` (string, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `dynamic_variables` (DynamicVariablesConfig, optional) — Configuration for dynamic variables
  - `execution_mode` (enum, optional, default: immediate) — 决定工具的执行时机和方式：'immediate' 会在 LLM 请求时立即执行工具；'post_tool_speech' 会等待智能体说完后再执行；'async' 会在后台运行工具且不阻塞，最适合耗时较长的操作。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `expects_response` (boolean, optional, default: false) — 如果为 true，调用此工具会阻塞对话，直到客户端返回响应并传递给 llm。如果为 false，则不会等待客户端响应，而是继续对话。这适合向用户展示内容而不阻塞对话。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `parameters` (ObjectJsonSchemaProperty-Output, optional, nullable) — 传递给客户端的所有参数的 Schema
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间（秒）。必须介于 1 到 120 秒之间（含），或设为 -1 以无限期等待客户端响应（需要 expects_response）。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。
- `type`: `mcp` (mcp)
- `type`: `system` (SystemToolConfig)
  - `name` (string, required)
  - `params` (ToolResponseModelToolConfigDiscriminatorMappingSystemParams, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `description` (string, optional, default: ) — 说明何时应使用该工具及其功能。留空则使用针对该工具类型优化的默认说明。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间，单位为秒。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。
- `type`: `webhook` (WebhookToolConfig)
  - `api_schema` (WebhookToolApiSchemaConfig-Output, required) — 出站 webhook 的架构，包括参数和 URL 规范。
  - `description` (string, required) — 说明何时应使用该工具及其功能。
  - `name` (string, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — Configuration for extracting values from tool responses and assigning them to dynamic variables
  - `dynamic_variables` (DynamicVariablesConfig, optional) — Configuration for dynamic variables
  - `execution_mode` (enum, optional, default: immediate) — 决定工具的执行时机和方式：'immediate' 会在 LLM 请求时立即执行工具；'post_tool_speech' 会等待智能体说完后再执行；'async' 会在后台运行工具且不阻塞，最适合耗时较长的操作。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `follow_redirects` (boolean, optional, default: false) — 是否解析端点重定向并返回最终响应。会跟随 1 次重定向，并以不带请求体的 GET 请求访问；此工具中配置的任何内容（标头、身份验证、客户端证书）都不会发送到重定向目标。端点和重定向目标均必须使用 HTTPS。不支持 API 集成工具。
  - `follow_redirects_allowed_domains` (list of string, optional) — 重定向可能指向的域名，例如 'test.example.com'。跟随重定向时必填，列表外的目标将被拒绝。
  - `interruption_mode` (enum, optional, default: allow) — 控制用户在此次工具调用前后能否打断智能体。'allow'（默认）允许用户随时打断，'disable_during_tool' 仅在工具运行期间禁止打断，'disable_during_tool_and_turn' 会在工具运行期间及其后的智能体响应期间禁止打断。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — 控制调用此工具前智能体是否说话。'auto'（默认）会根据近期工具延迟决定，'force' 始终要求智能体说话，'off' 无论延迟如何都完全禁用。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — 等待工具调用完成的最长时间，单位为秒。必须介于 5 秒和 300 秒之间（含）。
  - `tool_call_sound` (enum, optional, nullable) — 工具执行期间播放的预定义工具调用音效类型。未指定时，不播放工具调用音效。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — 决定工具调用提示音何时播放。'auto' 仅在工具调用前有语音时播放，'always' 会在每次工具调用时播放。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — 控制工具错误在共享给智能体前的处理方式。'auto' 会根据工具类型决定处理方式（原生集成会生成摘要，其他工具会隐藏），'summarized' 会发送由 LLM 生成的摘要，'passthrough' 会发送原始错误，'hide' 不会向智能体共享错误。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `interruption_mode`。如果为 true，当此工具运行时，用户无法打断智能体。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 已弃用：请改用 `pre_tool_speech`。如果为 true，智能体会在调用工具前发言。

### ResourceAccessInfo

- `is_creator` (boolean, required) — 发出请求的用户是否为该智能体的创建者
- `creator_name` (string, required) — 智能体创建者名称
- `creator_email` (string, required) — 智能体创建者的邮箱
- `role` (enum, required) — 发出请求的用户角色
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `anonymous_access_level_override` (enum, optional, nullable) — 匿名用户的访问级别。若为 None，该资源不会公开共享。
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `access_source` (enum, optional, nullable) — 请求用户拥有此资源访问权限的原因。'creator' = 调用者是所有者。'explicit' = 调用者（或其所属的某个工作区群组）列于 role_to_group_ids 中，且不包括工作区范围的所有人群组。'workspace_default' = 工作区范围的所有人群组列于 role_to_group_ids 中（所有非匿名工作区成员，包括管理员，均可查看此资源）。'workspace_admin' = 调用者是工作区管理员，且管理员席位是 *唯一* 的访问路径；此项仅用于其他人均无法查看的文档。这样 UI 可说明管理员绕过权限的查看者为何能看到未明确向其共享的文档。
  - Allowed values: `creator`, `explicit`, `workspace_admin`, `workspace_default`

### ToolUsageStatsResponseModel

- `avg_latency_secs` (double, required)
- `total_calls` (integer, optional, default: 0) — 工具调用总次数

### ToolResponseMockConfig-Output

- `mock_result` (string, required) — 此模拟处于启用状态时，LLM 看到的返回值。
- `parameter_conditions` (list of UnitTestToolCallParameter, optional) — 如果列表为空，模拟将始终启用。
- `is_error` (boolean, optional, default: false) — 如果为 true，模拟结果将作为工具错误而非成功结果提供给 LLM。

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### DynamicVariableAssignment

Configuration for extracting values from tool responses and assigning them to dynamic variables.

- `dynamic_variable` (string, required) — 要分配提取值的动态变量名称
- `value_path` (string, required) — 用于从源中提取值的点表示法路径（例如 'user.name' 或 'data.0.id'）
- `source` ("response", optional, default: response) — 提取值的来源。目前仅支持 'response'。
- `sanitize` (boolean, optional, default: false) — 如果为 true，此赋值的值会在发送给 LLM 和转录文本前从工具响应中移除，但仍会用于变量赋值处理。
- `preserve_native_type` (boolean, optional, default: false) — 如果为 true，从工具响应中提取的非标量值（列表、对象）将以原生类型存储，而非转换为 JSON 字符串。启用后，可将提取的数组直接用作列表动态变量。

### DynamicVariablesConfig

- `dynamic_variable_placeholders` (map from string to any, optional) — 动态变量占位符及其值的字典。

### ObjectJsonSchemaProperty-Input

- `property_kind` (enum, optional, default: object)
  - Allowed values: `array`, `object`
- `description` (string, optional, default: )
- `dynamic_variable` (string, optional, default: ) — 设置后，整个参数将在运行时从此动态变量填充。与 description（由 LLM 提供的值）、constant_value 和 is_omitted 互斥。
- `constant_value` (map from string to any, optional, nullable) — 设置后，整个对象将在运行时使用此常量 JSON 值。与 description（由 LLM 提供的对象）、dynamic_variable 和 is_omitted 互斥。
- `is_omitted` (boolean, optional, default: false) — 如果为 true，此参数将完全从请求中省略。仅对可选参数有效。与 description、dynamic_variable 和 constant_value 互斥。
- `type` ("object", optional, default: object)
- `required` (list of string, optional)
- `properties` (map from string to ObjectJsonSchemaPropertyInput, optional)
- `required_constraints` (RequiredConstraints, optional, nullable) — 适用于必填字段的 anyOf/allOf 组合约束包装器。

### ToolRequestModelToolConfigDiscriminatorMappingSystemParams

- `system_tool_type`: `end_call` (EndCallToolConfig)
- `system_tool_type`: `end_procedure` (EndProcedureToolConfig)
  - `procedures` (map from string to ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingEndProcedureProcedures, optional)
- `system_tool_type`: `knowledge_base` (KnowledgeBaseToolConfig)
  - `enabled_strategies` (list of enum, optional)
    - Allowed values: `cat`, `keyword`, `semantic`, `ls`
- `system_tool_type`: `knowledge_base_rag` (KnowledgeBaseRagToolConfig)
- `system_tool_type`: `language_detection` (LanguageDetectionToolConfig)
  - `only_at_conversation_start` (boolean, optional, default: false) — 如果前 2 轮用户发言未发生语言切换，之后的切换尝试将失败，对话将保持当前语言。如果在这几轮中发生语言切换，之后仍可切换。启用此项可降低错误切换的可能性。
- `system_tool_type`: `play_keypad_touch_tone` (PlayDTMFToolConfig)
  - `suppress_turn_after_dtmf` (boolean, optional, default: false) — 如果为 true，智能体播放 DTMF 音后不会继续生成语音。这可防止智能体语音干扰 IVR 系统。
  - `use_out_of_band_dtmf` (boolean, optional, default: true) — 将 DTMF 音作为带外 RTP 事件（RFC 4733）发送，而非带内音频。仅对通过 SIP 中继导入的号码生效。
- `system_tool_type`: `skip_turn` (SkipTurnToolConfig)
  - `wait_timeout_secs` (double, optional, default: -1) — 调用 skip_turn 后，智能体生成上下文跟进前的等待秒数。等待期间，"静默后结束对话"计时器会暂停。-1 可禁用等待：调用 skip_turn 后，智能体会保持静默，直到调用方发言，且该计时器会继续运行。仅适用于语音对话。
- `system_tool_type`: `start_procedure` (StartProcedureToolConfig)
  - `procedures` (map from string to ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingStartProcedureProcedures, optional)
- `system_tool_type`: `transfer_to_agent` (TransferToAgentToolConfig)
  - `transfers` (list of AgentTransfer-Input, required)
- `system_tool_type`: `transfer_to_number` (TransferToNumberToolConfig)
  - `transfers` (list of PhoneNumberTransfer, required)
  - `enable_client_message` (boolean, optional, default: true) — 是否在客户等待转接时播放消息。为保持向后兼容，默认为 true。
- `system_tool_type`: `voicemail_detection` (VoicemailDetectionToolConfig)
  - `voicemail_message` (string, optional, nullable) — 检测到语音信箱时留下的可选消息。未提供时，检测到语音信箱后将立即结束通话。支持动态变量（例如 \{\{system\_\_time}}、\{\{system\_\_call\_duration\_secs}}、\{\{custom\_variable}}）。

### WebhookToolApiSchemaConfig-Input

- `url` (string, required) — 将发送 webhook 的 URL。可包含路径参数，例如 [https://example.com/agents/\{agent\_id}](https://example.com/agents/\{agent_id})
- `request_headers` (map from string to WebhookToolApiSchemaConfigInputRequestHeaders, optional) — 请求中应包含的请求头
- `method` (enum, optional, default: GET) — webhook 使用的 HTTP 方法
  - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
- `path_params_schema` (map from string to LiteralJsonSchemaProperty, optional) — 路径参数的 Schema（如有）。键应与 URL 中的占位符匹配。
- `query_params_schema` (QueryParamsJsonSchema-Input, optional, nullable) — 查询参数的 Schema（如有）。这些参数将作为查询参数添加到 URL 末尾。注意：查询参数中的属性必须全部为字面量类型。
- `request_body_schema` (ObjectJsonSchemaProperty-Input, optional, nullable) — 请求正文参数的 Schema（如有）。用于 POST/PATCH/PUT 请求。该 Schema 应为作为 JSON 正文发送的对象。
- `response_body_schema` (ObjectJsonSchemaProperty-Input, optional, nullable) — 描述预期响应正文结构的 Schema。仅用于文档，不会提供给 LLM。
- `response_filter` (ResponseFilter, optional, nullable) — 在 LLM 查看回复前应用的可选允许列表过滤器，避免大型回复污染上下文。默认为完整回复。
- `content_type` (enum, optional, default: application/json) — Content type for the request body. Only applies to POST/PUT/PATCH requests.
  - Allowed values: `application/json`, `application/x-www-form-urlencoded`
- `auth_resolved_params` (list of string, optional) — 从身份验证连接而非 path_params_schema 解析的 URL 占位符（例如通过 UrlSecretAuthConnection 注入的密钥）。
- `auth_connection` (WebhookToolApiSchemaConfigInputAuthConnection, optional, nullable) — 用于向此 webhook 进行身份验证的可选认证连接

### UnitTestToolCallParameter

- `eval` (UnitTestToolCallParameterEval, required)
- `path` (string, required)

### ObjectJsonSchemaProperty-Output

- `description` (string, optional, default: )
- `dynamic_variable` (string, optional, default: ) — 设置后，整个参数将在运行时从此动态变量填充。与 description（由 LLM 提供的值）、constant_value 和 is_omitted 互斥。
- `constant_value` (map from string to any, optional, nullable) — 设置后，整个对象将在运行时使用此常量 JSON 值。与 description（由 LLM 提供的对象）、dynamic_variable 和 is_omitted 互斥。
- `is_omitted` (boolean, optional, default: false) — 如果为 true，此参数将完全从请求中省略。仅对可选参数有效。与 description、dynamic_variable 和 constant_value 互斥。
- `type` ("object", optional, default: object)
- `required` (list of string, optional)
- `properties` (map from string to ObjectJsonSchemaPropertyOutput, optional)
- `required_constraints` (RequiredConstraints, optional, nullable) — 适用于必填字段的 anyOf/allOf 组合约束包装器。

### ToolResponseModelToolConfigDiscriminatorMappingSystemParams

- `system_tool_type`: `end_call` (EndCallToolConfig)
- `system_tool_type`: `end_procedure` (EndProcedureToolConfig)
  - `procedures` (map from string to ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingEndProcedureProcedures, optional)
- `system_tool_type`: `knowledge_base` (KnowledgeBaseToolConfig)
  - `enabled_strategies` (list of enum, optional)
    - Allowed values: `cat`, `keyword`, `semantic`, `ls`
- `system_tool_type`: `knowledge_base_rag` (KnowledgeBaseRagToolConfig)
- `system_tool_type`: `language_detection` (LanguageDetectionToolConfig)
  - `only_at_conversation_start` (boolean, optional, default: false) — 如果前 2 轮用户发言未发生语言切换，之后的切换尝试将失败，对话将保持当前语言。如果在这几轮中发生语言切换，之后仍可切换。启用此项可降低错误切换的可能性。
- `system_tool_type`: `play_keypad_touch_tone` (PlayDTMFToolConfig)
  - `suppress_turn_after_dtmf` (boolean, optional, default: false) — 如果为 true，智能体播放 DTMF 音后不会继续生成语音。这可防止智能体语音干扰 IVR 系统。
  - `use_out_of_band_dtmf` (boolean, optional, default: true) — 将 DTMF 音作为带外 RTP 事件（RFC 4733）发送，而非带内音频。仅对通过 SIP 中继导入的号码生效。
- `system_tool_type`: `skip_turn` (SkipTurnToolConfig)
  - `wait_timeout_secs` (double, optional, default: -1) — 调用 skip_turn 后，智能体生成上下文跟进前的等待秒数。等待期间，"静默后结束对话"计时器会暂停。-1 可禁用等待：调用 skip_turn 后，智能体会保持静默，直到调用方发言，且该计时器会继续运行。仅适用于语音对话。
- `system_tool_type`: `start_procedure` (StartProcedureToolConfig)
  - `procedures` (map from string to ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingStartProcedureProcedures, optional)
- `system_tool_type`: `transfer_to_agent` (TransferToAgentToolConfig)
  - `transfers` (list of AgentTransfer-Output, required)
- `system_tool_type`: `transfer_to_number` (TransferToNumberToolConfig)
  - `transfers` (list of PhoneNumberTransfer, required)
  - `enable_client_message` (boolean, optional, default: true) — 是否在客户等待转接时播放消息。为保持向后兼容，默认为 true。
- `system_tool_type`: `voicemail_detection` (VoicemailDetectionToolConfig)
  - `voicemail_message` (string, optional, nullable) — 检测到语音信箱时留下的可选消息。未提供时，检测到语音信箱后将立即结束通话。支持动态变量（例如 \{\{system\_\_time}}、\{\{system\_\_call\_duration\_secs}}、\{\{custom\_variable}}）。

### WebhookToolApiSchemaConfig-Output

- `url` (string, required) — 将发送 webhook 的 URL。可包含路径参数，例如 [https://example.com/agents/\{agent\_id}](https://example.com/agents/\{agent_id})
- `request_headers` (map from string to WebhookToolApiSchemaConfigOutputRequestHeaders, optional) — 请求中应包含的请求头
- `method` (enum, optional, default: GET) — webhook 使用的 HTTP 方法
  - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
- `path_params_schema` (map from string to LiteralJsonSchemaProperty, optional) — 路径参数的 Schema（如有）。键应与 URL 中的占位符匹配。
- `query_params_schema` (QueryParamsJsonSchema-Output, optional, nullable) — 查询参数的 Schema（如有）。这些参数将作为查询参数添加到 URL 末尾。注意：查询参数中的属性必须全部为字面量类型。
- `request_body_schema` (ObjectJsonSchemaProperty-Output, optional, nullable) — 请求正文参数的 Schema（如有）。用于 POST/PATCH/PUT 请求。该 Schema 应为作为 JSON 正文发送的对象。
- `response_body_schema` (ObjectJsonSchemaProperty-Output, optional, nullable) — 描述预期响应正文结构的 Schema。仅用于文档，不会提供给 LLM。
- `response_filter` (ResponseFilter, optional, nullable) — 在 LLM 查看回复前应用的可选允许列表过滤器，避免大型回复污染上下文。默认为完整回复。
- `content_type` (enum, optional, default: application/json) — Content type for the request body. Only applies to POST/PUT/PATCH requests.
  - Allowed values: `application/json`, `application/x-www-form-urlencoded`
- `auth_resolved_params` (list of string, optional) — 从身份验证连接而非 path_params_schema 解析的 URL 占位符（例如通过 UrlSecretAuthConnection 注入的密钥）。
- `auth_connection` (WebhookToolApiSchemaConfigOutputAuthConnection, optional, nullable) — 用于向此 webhook 进行身份验证的可选认证连接

### ValidationErrorLocItems

- string
- integer

### ObjectJsonSchemaPropertyInput

- LiteralJsonSchemaProperty: LiteralJsonSchemaProperty
- ObjectJsonSchemaProperty: ObjectJsonSchemaProperty-Input
- ArrayJsonSchemaProperty: ArrayJsonSchemaProperty-Input

### RequiredConstraints

适用于必填字段的 anyOf/allOf 组合约束包装器。

- `any_of` (list of RequiredConstraint, optional)
- `all_of` (list of RequiredConstraint, optional)

### ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingEndProcedureProcedures

- ProcedureVersionRef: ProcedureVersionRef
- ProcedureDraftRef: ProcedureDraftRef

### ToolResponseModelToolConfigDiscriminatorMappingSystemParamsDiscriminatorMappingStartProcedureProcedures

- ProcedureVersionRef: ProcedureVersionRef
- ProcedureDraftRef: ProcedureDraftRef

### AgentTransfer-Input

- `condition` (string, required)
- `agent_id` (string, optional, nullable)
- `branch_id` (string, optional, nullable)
- `node_id` (string, optional, nullable)
- `delay_ms` (integer, optional, default: 0)
- `transfer_message` (string, optional, nullable)
- `enable_transferred_agent_first_message` (boolean, optional, default: false)
- `is_workflow_node_transfer` (boolean, optional, default: false)
- `preserve_client_tts_overrides` (boolean, optional, default: false) — 定义是否将 TTS 客户端覆盖设置沿用至被转接的智能体。
- `preserve_voice_settings` (boolean, optional, default: false) — 定义是否将基础音色、TTS 模型和音色设置沿用至被转接的智能体。

### PhoneNumberTransfer

- `transfer_destination` (PhoneNumberTransferTransferDestination, required)
- `condition` (string, required)
- `custom_sip_headers` (list of PhoneNumberTransferCustomSipHeadersItems, optional) — 转接通话时包含的自定义 SIP 请求头。每个请求头可以是静态值或动态变量引用。
- `transfer_type` (enum, optional, default: conference)
  - Allowed values: `blind`, `conference`, `sip_refer`
- `sip_refer_play_dialtone` (boolean, optional, default: true) — 设为 True 时，在 SIP REFER 转接完成期间，原始通话线路会播放回铃音。该音调会通过 RTP 传输给执行 REFER 的 SIP 对端，因此如果接收系统（如 SBC 或呼叫中心）不应听到该音调，请禁用此项。禁用后，呼叫方在转接完成前将听到静音。仅适用于 SIP REFER 转接。
- `uui` (UUITransferConfig, optional, nullable) — 附加到 SIP REFER 转接的用户间信息（User-to-User Information，RFC 7433）。可在转接过程中携带 CRM 标识符或升级原因等通话上下文。
- `post_dial_digits` (PhoneNumberTransferPostDialDigits, optional, nullable) — 通话接通后发送的 DTMF 按键（例如，分机号使用 'ww1234'）。可以是静态值或动态变量引用。使用 'w' 表示暂停 0.5 秒。仅支持 Twilio 转接。
- `phone_number` (string, optional, nullable, deprecated)

### WebhookToolApiSchemaConfigInputRequestHeaders

- string
- ConvAISecretLocator: ConvAISecretLocator
- ConvAIDynamicVariable: ConvAIDynamicVariable
- ConvAIEnvVarLocator: ConvAIEnvVarLocator

### LiteralJsonSchemaProperty

字面量 JSON 类型的 Schema 属性。重要提示：以下字段只能设置其中一个：description（LLM 提供值）、dynamic_variable（来自变量的值）、is_system_provided（系统提供值）、constant_value（固定值）或 is_omitted（省略参数）。这些字段互斥。

- `type` (LiteralJsonSchemaPropertyType, required)
- `description` (string, optional, default: ) — 属性描述。设置后，LLM 将根据此描述提供值。不能与 dynamic_variable、is_system_provided、constant_value 和 is_omitted 同时使用。
- `enum` (list of string, optional, nullable) — List of allowed string values for string type parameters
- `is_system_provided` (boolean, optional, default: false) — 如果为 true，该值将在运行时由系统填充。供 API Integration Webhook 工具用于模板化。与 description、dynamic_variable、constant_value 和 is_omitted 互斥。
- `dynamic_variable` (string, optional, default: ) — 用于此属性值的动态变量名称。不能与 description、is_system_provided、constant_value 和 is_omitted 同时使用。
- `allowed_values` (AllowedValues, optional, nullable) — 针对 LLM 提供值的服务端拒绝保护：运行时会拒绝此对象指定的允许集合以外的任何值，且不会将该集合以枚举形式提供给 LLM。仅当值来源为 `description` 时支持；与 dynamic_variable、is_system_provided、constant_value 或 is_omitted 结合使用会被拒绝。
- `constant_value` (LiteralJsonSchemaPropertyConstantValue, optional, nullable, default: ) — 用于此属性的常量值。与 description、dynamic_variable、is_system_provided 和 is_omitted 互斥。
- `is_omitted` (boolean, optional, default: false) — 如果为 true，此参数将完全从请求中省略。仅对可选参数有效。与 description、dynamic_variable、is_system_provided 和 constant_value 互斥。
- `allowed_values_dynamic_variable` (string, optional, default: , deprecated) — 已弃用：请改用 `allowed_values`。设置后，LLM 会提供值，但运行时会拒绝此动态变量持有的列表中不存在的任何值（必须是 JSON 数组，例如 ["ws_alpha", "ws_beta"]）。用于让 LLM 从服务器验证的集合中选择（例如当前用户允许访问的 ID）。需要 description；不能与 dynamic_variable、is_system_provided、constant_value 和 is_omitted 同时使用。

### QueryParamsJsonSchema-Input

- `properties` (map from string to LiteralJsonSchemaProperty, required)
- `required` (list of string, optional)

### ResponseFilter

Configuration for filtering tool responses before they are visible to the agent.

- `mode` (enum, optional, default: all) — 控制工具响应的过滤方式。'all' 返回完整响应，'allow' 仅返回指定路径，'hide_all' 隐藏整个响应。
  - Allowed values: `all`, `allow`, `hide_all`
- `filters` (list of string, optional) — 当 mode 为 'allow' 时要包含的点表示法路径（例如 ['ticket.id', 'ticket.status']）。
- `content_type` ("application/json", optional, default: application/json) — Content type for response filtering. Only 'application/json' responses are filtered.

### WebhookToolApiSchemaConfigInputAuthConnection

用于向此 webhook 进行身份验证的可选认证连接

- AuthConnectionLocator: AuthConnectionLocator
- EnvironmentAuthConnectionLocator: EnvironmentAuthConnectionLocator

### UnitTestToolCallParameterEval

- `type`: `anything` (MatchAnythingParameterEvaluationStrategy)
- `type`: `exact` (ExactParameterEvaluationStrategy)
  - `expected_value` (string, required) — 参数必须匹配的精确字符串值。
- `type`: `llm` (LLMParameterEvaluationStrategy)
  - `description` (string, required) — 用于测试的评估策略说明。
- `type`: `regex` (RegexParameterEvaluationStrategy)
  - `pattern` (string, required) — 用于匹配智能体回复的正则表达式模式。

### ObjectJsonSchemaPropertyOutput

- LiteralJsonSchemaProperty: LiteralJsonSchemaProperty
- ObjectJsonSchemaProperty: ObjectJsonSchemaProperty-Output
- ArrayJsonSchemaProperty: ArrayJsonSchemaProperty-Output

### AgentTransfer-Output

- `condition` (string, required)
- `agent_id` (string, optional, nullable)
- `branch_id` (string, optional, nullable)
- `node_id` (string, optional, nullable)
- `delay_ms` (integer, optional, default: 0)
- `transfer_message` (string, optional, nullable)
- `enable_transferred_agent_first_message` (boolean, optional, default: false)
- `is_workflow_node_transfer` (boolean, optional, default: false)
- `preserve_client_tts_overrides` (boolean, optional, default: false) — 定义是否将 TTS 客户端覆盖设置沿用至被转接的智能体。
- `preserve_voice_settings` (boolean, optional, default: false) — 定义是否将基础音色、TTS 模型和音色设置沿用至被转接的智能体。

### WebhookToolApiSchemaConfigOutputRequestHeaders

- string
- ConvAISecretLocator: ConvAISecretLocator
- ConvAIDynamicVariable: ConvAIDynamicVariable
- ConvAIEnvVarLocator: ConvAIEnvVarLocator

### QueryParamsJsonSchema-Output

- `properties` (map from string to LiteralJsonSchemaProperty, required)
- `required` (list of string, optional)

### WebhookToolApiSchemaConfigOutputAuthConnection

用于向此 webhook 进行身份验证的可选认证连接

- AuthConnectionLocator: AuthConnectionLocator
- EnvironmentAuthConnectionLocator: EnvironmentAuthConnectionLocator

### ArrayJsonSchemaProperty-Input

- `property_kind` (enum, optional, default: array)
  - Allowed values: `array`, `object`
- `description` (string, optional, default: )
- `dynamic_variable` (string, optional, default: ) — 设置后，整个参数将在运行时从此动态变量填充。与 description（由 LLM 提供的值）、constant_value 和 is_omitted 互斥。
- `constant_value` (list of any, optional, nullable) — 设置后，整个数组将在运行时使用此常量值。与 description（由 LLM 提供的数组）、dynamic_variable 和 is_omitted 互斥。
- `is_omitted` (boolean, optional, default: false) — 如果为 true，此参数将完全从请求中省略。仅对可选参数有效。与 description、dynamic_variable 和 constant_value 互斥。
- `type` ("array", optional, default: array)
- `items` (ArrayJsonSchemaPropertyInputItems, optional, default: {"allowed_values_dynamic_variable":"","constant_value":"","description":"Array element","dynamic_variable":"","is_omitted":false,"is_system_provided":false,"type":"string"}) — 数组元素的 Schema。

### RequiredConstraint

必须全部存在才能满足此约束的一组字段。

- `required` (list of string, required)

### ProcedureVersionRef

- `procedure_id` (string, required) — 流程 ID
- `version_id` (string, required) — 过程版本的版本 ID。

### ProcedureDraftRef

- `procedure_id` (string, required) — 流程 ID
- `version_id` (any, optional)

### PhoneNumberTransferTransferDestination

- `type`: `phone` (PhoneNumberTransferDestination)
  - `phone_number` (string, required)
- `type`: `phone_dynamic_variable` (PhoneNumberDynamicVariableTransferDestination)
  - `phone_number` (string, required)
- `type`: `sip_uri` (SIPUriTransferDestination)
  - `sip_uri` (string, required)
- `type`: `sip_uri_dynamic_variable` (SIPUriDynamicVariableTransferDestination)
  - `sip_uri` (string, required)

### PhoneNumberTransferCustomSipHeadersItems

- `type`: `dynamic` (CustomSIPHeaderWithDynamicVariable)
  - `key` (string, required) — SIP 请求头名称（例如 'X-Customer-ID'）
  - `value` (string, required) — 要解析的动态变量名称
- `type`: `static` (CustomSIPHeader)
  - `key` (string, required) — SIP 请求头名称（例如 'X-Customer-ID'）
  - `value` (string, required) — 标头值

### UUITransferConfig

用于 SIP REFER 转接的用户间信息（User-to-User Information）封装（RFC 7433）。 出站载荷采用十六进制编码（RFC 7433 唯一规定的编码）。协议判别维度允许通过配置表达各平台格式（Talkdesk、Genesys 等），而非分散使用转接标记。还可在此添加更多维度（ASCII 编码、标头名称、用途/内容参数），无需修改转接模型。

- `data` (string, required) — 在 SIP REFER 转接中发送的 UUI 载荷。支持内联动态变量，并会在转接时进行十六进制编码。
- `protocol_discriminator` (string, optional, nullable) — 可选的单八位组协议区分符（2 个十六进制数字，例如 '00'）。Genesys Cloud 等平台需要此项，否则会剥离有效负载的第一个八位组。对于需要纯十六进制有效负载的 Talkdesk 等平台，请留空。
- `protocol_discriminator_mode` (enum, optional, default: prefix) — 如何附加 protocol\_discriminator。'prefix' 会将该字节前置到十六进制载荷（User-to-User=XX\<hex>;encoding=hex）；'pd\_parameter' 会将其作为单独参数发送（User-to-User=\<hex>;pd=XX;encoding=hex）。未设置 protocol\_discriminator 时将忽略此项。
  - Allowed values: `prefix`, `pd_parameter`

### PhoneNumberTransferPostDialDigits

通话接通后发送的 DTMF 按键（例如，分机号使用 'ww1234'）。可以是静态值或动态变量引用。使用 'w' 表示暂停 0.5 秒。仅支持 Twilio 转接。

- `type`: `dynamic` (PostDialDigitsDynamicVariable)
  - `value` (string, required) — 要解析的动态变量名称
- `type`: `static` (PostDialDigitsStatic)
  - `value` (string, required) — 通话接通后发送的 DTMF 按键（例如，分机号使用 'ww1234'）

### ConvAISecretLocator

用于引用智能体密钥存储中的密钥。

- `secret_id` (string, required)

### ConvAIDynamicVariable

用于引用动态变量。

- `variable_name` (string, required)

### ConvAIEnvVarLocator

用于通过标签引用环境变量。

- `env_var_label` (string, required)

### LiteralJsonSchemaPropertyType

- enum
  - Allowed values: `boolean`, `string`, `integer`, `number`
- list of string

### AllowedValues

- `dynamic_variable` (string, required) — 动态变量名称，必须解析为包含允许值的 JSON 数组，例如 ["ws_alpha", "ws_beta"]。系统变量仅在解析为列表时有效。

### LiteralJsonSchemaPropertyConstantValue

用于此属性的常量值。与 description、dynamic_variable、is_system_provided 和 is_omitted 互斥。

- string
- integer
- double
- boolean

### AuthConnectionLocator

用于引用工作区身份验证连接存储中的身份验证连接。

- `auth_connection_id` (string, required)

### EnvironmentAuthConnectionLocator

通过标签引用类型为 'auth_connection' 的环境变量。 运行时会解析为当前环境的认证连接， 并回退到默认环境。

- `env_var_label` (string, required)

### ArrayJsonSchemaProperty-Output

- `description` (string, optional, default: )
- `dynamic_variable` (string, optional, default: ) — 设置后，整个参数将在运行时从此动态变量填充。与 description（由 LLM 提供的值）、constant_value 和 is_omitted 互斥。
- `constant_value` (list of any, optional, nullable) — 设置后，整个数组将在运行时使用此常量值。与 description（由 LLM 提供的数组）、dynamic_variable 和 is_omitted 互斥。
- `is_omitted` (boolean, optional, default: false) — 如果为 true，此参数将完全从请求中省略。仅对可选参数有效。与 description、dynamic_variable 和 constant_value 互斥。
- `type` ("array", optional, default: array)
- `items` (ArrayJsonSchemaPropertyOutputItems, optional, default: {"allowed_values_dynamic_variable":"","constant_value":"","description":"Array element","dynamic_variable":"","is_omitted":false,"is_system_provided":false,"type":"string"}) — 数组元素的 Schema。

### ArrayJsonSchemaPropertyInputItems

数组元素的 Schema。

- LiteralJsonSchemaProperty: LiteralJsonSchemaProperty
- ObjectJsonSchemaProperty: ObjectJsonSchemaProperty-Input
- ArrayJsonSchemaProperty: ArrayJsonSchemaProperty-Input

### ArrayJsonSchemaPropertyOutputItems

数组元素的 Schema。

- LiteralJsonSchemaProperty: LiteralJsonSchemaProperty
- ObjectJsonSchemaProperty: ObjectJsonSchemaProperty-Output
- ArrayJsonSchemaProperty: ArrayJsonSchemaProperty-Output

## Examples

**Request**

```json
{
  "tool_config": {
    "type": "system",
    "name": "end_call",
    "params": {
      "system_tool_type": "end_call"
    },
    "description": ""
  }
}
```

**Response**

```json
{
  "id": "string",
  "tool_config": {
    "type": "system",
    "name": "end_call",
    "params": {
      "system_tool_type": "end_call"
    },
    "description": ""
  },
  "access_info": {
    "is_creator": true,
    "creator_name": "John Doe",
    "creator_email": "john.doe@example.com",
    "role": "admin",
    "access_source": "creator"
  },
  "usage_stats": {
    "avg_latency_secs": 1.1,
    "total_calls": 0
  },
  "response_mocks": [
    {
      "mock_result": "string",
      "parameter_conditions": [
        {
          "eval": {
            "description": "string",
            "type": "string"
          },
          "path": "string"
        }
      ],
      "is_error": false
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/tools"

payload = { "tool_config": {
        "type": "system",
        "name": "end_call",
        "params": { "system_tool_type": "end_call" },
        "description": ""
    } }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/tools';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"tool_config":{"type":"system","name":"end_call","params":{"system_tool_type":"end_call"},"description":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/tools"

	payload := strings.NewReader("{\n  \"tool_config\": {\n    \"type\": \"system\",\n    \"name\": \"end_call\",\n    \"params\": {\n      \"system_tool_type\": \"end_call\"\n    },\n    \"description\": \"\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/tools")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tool_config\": {\n    \"type\": \"system\",\n    \"name\": \"end_call\",\n    \"params\": {\n      \"system_tool_type\": \"end_call\"\n    },\n    \"description\": \"\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.elevenlabs.io/v1/convai/tools")
  .header("Content-Type", "application/json")
  .body("{\n  \"tool_config\": {\n    \"type\": \"system\",\n    \"name\": \"end_call\",\n    \"params\": {\n      \"system_tool_type\": \"end_call\"\n    },\n    \"description\": \"\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.elevenlabs.io/v1/convai/tools', [
  'body' => '{
  "tool_config": {
    "type": "system",
    "name": "end_call",
    "params": {
      "system_tool_type": "end_call"
    },
    "description": ""
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/tools");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tool_config\": {\n    \"type\": \"system\",\n    \"name\": \"end_call\",\n    \"params\": {\n      \"system_tool_type\": \"end_call\"\n    },\n    \"description\": \"\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["tool_config": [
    "type": "system",
    "name": "end_call",
    "params": ["system_tool_type": "end_call"],
    "description": ""
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/tools")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```