> 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.

# ツールの割り込み

## 概要

デフォルトでは、ツールの実行中を含め、ユーザーはいつでもエージェントを中断できます。一部のツールでは、これは望ましくありません。検索後に読み上げられる支払い確認やコンプライアンスに関する免責事項は、最後まで確実に伝える必要があります。

`interruption_mode`フィールドで、ツールごとにこれを制御できます。Webhookツール、クライアントツール、システムツール、MCPサーバーで利用できます。

## 中断モード

| 値                              | ダッシュボードのラベル | 動作                                     |
| ------------------------------ | ----------- | -------------------------------------- |
| `allow`                        | 許可          | ユーザーはいつでもエージェントを中断できます。これがデフォルトです。     |
| `disable_during_tool`          | 実行中は無効化     | ツールの実行中のみ中断を抑制します。その後のエージェント応答は中断できます。 |
| `disable_during_tool_and_turn` | ターン全体で無効化   | ツールの実行中と、その後に続くエージェント応答中は中断を抑制します。     |

複数のツールを並列実行する場合、そのターンでは最も厳しいモードが適用されます。

> **Note**
>
> ブール値の`disable_interruptions`フィールドは非推奨です。代わりに`interruption_mode`を使用してください。2つのフィールドは同期されるため、`disable_interruptions: true`は`interruption_mode:
>   "disable_during_tool_and_turn"`と同等です。既存のインテグレーションは変更なしで引き続き動作します。

## 設定

#### ダッシュボードで更新

#### ツール設定に移動

**Tools**タブで設定するツールを選択します。

#### 中断モードを設定

**Advanced settings**を開き、**Interruptions**でオプションを選択します。

#### 設定を保存

**Save**をクリックして変更を適用します。

#### CLIで更新

#### ツール設定を取得

```bash
elevenlabs tools pull
```

#### \`tool_configs/\<tool-name>.json\`を編集

ツールに`interruption_mode`を設定します。

```json
{
  "type": "webhook",
  "name": "confirm_payment",
  "description": "Confirms a pending payment",
  "interruption_mode": "disable_during_tool_and_turn"
}
```

#### 変更をプッシュ

```bash
elevenlabs tools push
```

#### APIで更新

```python
from elevenlabs import ElevenLabs, ToolRequestModel

elevenlabs = ElevenLabs()

elevenlabs.conversational_ai.tools.update(
    tool_id="tool_7101k5zvyjhmfg983brhmhkd98n6",
    request=ToolRequestModel(
        tool_config={
            "type": "webhook",
            "name": "confirm_payment",
            "description": "Confirms a pending payment",
            "interruption_mode": "disable_during_tool_and_turn",
            "api_schema": {
                "url": "https://api.example.com/payments/confirm",
                "method": "POST",
            },
        },
    ),
)
```

```typescript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";

const elevenlabs = new ElevenLabsClient();

await elevenlabs.conversationalAi.tools.update("tool_7101k5zvyjhmfg983brhmhkd98n6", {
  toolConfig: {
    type: "webhook",
    name: "confirm_payment",
    description: "Confirms a pending payment",
    interruptionMode: "disable_during_tool_and_turn",
    apiSchema: {
      url: "https://api.example.com/payments/confirm",
      method: "POST",
    },
  },
});
```

## MCPサーバー

[MCPサーバー](/docs/ja/eleven-agents/customization/tools/mcp)には独自の`interruption_mode`があり、公開するすべてのツールに適用されます。個々のツールはサーバーの`tool_config_overrides`を通じてこれを上書きでき、ツールに設定された値がサーバーのデフォルトより優先されます。

## ベストプラクティス

* 送金やキーパッド操作など、ツール呼び出し自体を完了する必要がある一方で、その後の応答はユーザーが中断できるようにする場合は、`disable_during_tool`を使用します。
* 免責事項や確認内容の読み上げなど、ツール後の応答を最後まで聞いてもらう必要がある場合は、`disable_during_tool_and_turn`を使用します。
* 中断を抑制すると会話の応答性が低く感じられるため、それ以外ではデフォルトの`allow`をそのまま使用してください。