Skip to content

Tools Overview

ESP-Claw comes with 40+ built-in tools that the AI agent can use to interact with hardware and software. Tools are called automatically based on the conversation context.

ToolDescriptionGPIO Required
gpio_readRead digital pin stateAny GPIO
gpio_writeSet digital pin high/lowAny GPIO
pwm_setSet PWM duty cyclePWM-capable GPIO
adc_readRead analog voltageADC-capable GPIO
dht_readRead DHT22 temperature & humidityAny digital GPIO
servo_setSet servo angle (0-180°)PWM-capable GPIO
neopixelControl WS2812 LEDsAny digital GPIO
i2c_scanScan for I2C devicesSDA/SCL pins
i2s_recordRecord audio via I2S micI2S pins
i2s_playPlay audio via I2S speakerI2S pins
ir_sendSend IR remote commandsIR LED GPIO
ToolDescriptionRequirements
telegram_sendSend Telegram messageBot token configured
discord_sendSend Discord messageBot token configured
mqtt_publishPublish MQTT messageBroker configured
http_getMake HTTP GET requestWi-Fi connected
http_postMake HTTP POST requestWi-Fi connected
webhookTrigger a webhook URLWi-Fi connected
ToolDescription
timer_setSet a countdown timer
cron_scheduleSchedule recurring tasks
memory_saveSave to persistent memory
memory_readRead from persistent memory
ota_checkCheck for firmware updates
deep_sleepEnter low-power sleep mode
system_infoGet device status (uptime, memory, etc.)
wifi_scanScan nearby Wi-Fi networks

You can register your own tools using the C API:

esp_err_t my_tool_handler(const char *params, char *result, size_t len, void *user_data) {
// Parse params JSON, do your thing, write result
snprintf(result, len, "{\"status\": \"ok\", \"value\": 42}");
return ESP_OK;
}
// Register during init
claw_tool_register("my_tool", "Description for the AI", my_tool_handler, NULL);

See the API Reference for detailed documentation.