Assistant CoreAssistant Core
Tools & MCP

Device Tools

Cách ESP32 device cung cấp tools cho voice assistant.

Device Tools dùng khi một device đã connect với Assistant Core và expose capability riêng trong voice session. Ví dụ: device có thể báo sensor status, đổi theme, restart, điều khiển đèn hoặc thực hiện action mà firmware hỗ trợ.

Hai Loại Device Tools

TypeDùng để làm gì
Device MCPDevice tự publish tool list theo MCP
Device IoTDevice publish properties và control actions như bật/tắt, đổi value, kiểm tra status

Requirements

  • Device đã được register và attach với assistant.
  • Device đang online trong voice session.
  • Firmware hỗ trợ MCP hoặc IoT descriptors.
  • Assistant đã enable voice.

Cách Hoạt Động Trong Voice

  1. Device mở voice session với Assistant Core.
  2. Nếu device hỗ trợ MCP, server yêu cầu device gửi tool list.
  3. Nếu device cung cấp IoT descriptors, properties và actions được chuyển thành tools.
  4. Khi user nói một request phù hợp, assistant call tool qua device connection.
  5. Device thực hiện action hoặc trả data lại cho assistant.

Ví Dụ

User nóiDevice tool có thể chạy
“Bật đèn phòng khách”Call light control action nếu firmware hỗ trợ
“Nhiệt độ hiện tại bao nhiêu?”Read temperature sensor property
“Đổi theme trên device”Call theme update tool nếu device hỗ trợ
“Restart device”Call restart action nếu firmware expose action này

Check Device Tools

Trong một số device screens, Assistant Core có thể gửi MCP commands như tools/list hoặc tools/call đến device để inspect capabilities device đang expose.

Nếu tools không xuất hiện:

  • Kiểm tra device có online không.
  • Kiểm tra firmware có hỗ trợ MCP hoặc IoT descriptors không.
  • Kiểm tra device đã attach đúng assistant chưa.
  • Restart device sau khi update firmware.

Device Tools phụ thuộc vào firmware. Hai devices cùng board type có thể expose capability khác nhau nếu chạy firmware khác nhau.

On this page