Delete Retained Message
emqx_delete_retainedDelete a stale retained message for a topic to remove outdated Home Assistant discovery entries or ghost device states. This action is permanent.
Instructions
[DESTRUCTIVE] Delete the retained message for one topic.
This is the correct way to remove a stale Home Assistant discovery entry or a ghost device state. It cannot be undone — the previous payload is gone unless something republishes it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>"
},
"name": "emqx_delete_retained"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Exact topic whose retained message to remove. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||