Delete a Playlist
Delete a playlist in Tosca Cloud. This is a destructive, irreversible action.
Always use --json --silent on every toscactl command.
Steps
Parse arguments. Extract from
$ARGUMENTS:- Playlist name or ID (required)
Look up the playlist to confirm it exists and show the user what will be deleted.
toscactl playlists view "<name_or_id>" --json --silentParse the JSON response to extract the playlist name and ID. Show these details to the user.
Confirm with the user. Warn that this action is irreversible and ask for explicit confirmation before proceeding. Do NOT proceed without the user saying yes.
Delete the playlist.
toscactl playlists delete "<name_or_id>" --dangerously-skip-confirmation --json --silentReport result. Confirm the playlist was deleted.
Error Handling
- If the playlist is not found, suggest searching for playlists with
/tosca-find. - If deletion fails with an authorization error, check auth with
toscactl config --json --silentand suggest re-authenticating with/tosca-setup.