add_to_playlist
Add a file or stream to a LibreTime playlist by ID; optionally set position or append to the end. Check current contents before choosing the next position.
Instructions
Add a file or stream to a playlist. Use get_playlist_contents to check the current contents and determine the next position.
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": {
"playlist_id": "<playlist_id>"
},
"name": "add_to_playlist"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | No | File ID to add (use for audio files) | |
| position | No | Position in the playlist (0-based). Appends to end if omitted. | |
| stream_id | No | Stream ID to add (use for webstreams) | |
| playlist_id | Yes | Playlist ID to add to |