music_add_to_playlist
Music · macOS
Effect: write (strongest supported action). Status: gated.
Gated means the tool requires an installed app, a connected account, permission, or runtime availability. Check those requirements on the listed platform before using it.
macOS
Purpose
Adds library tracks to a playlist of the Music app, in the order given. Called without confirm it returns a preview and adds nothing; pass confirm=true to add. `playlist` is a name or an id; when no playlist has that name, create=true creates it, and without it nothing is added. Smart playlists, folders and playlists the Music app manages are refused. When any track id is not in the library, nothing is added. A track that is already in the playlist is added again. Opens the Music app when it is closed.
Required inputs
playlist— Playlist name or id from music_list_playlists.track_ids— Track ids from music_search_library (at most 100).
Permissions and confirmation
Explicit confirmation parameter: inspect the schema and tool description before any real call. The documentation example keeps confirm false. Obtain user authorization before performing the action.
- Use only the apps, accounts and resources authorized by the user on this platform. Consult this tool's platform-specific description for its connection and permission requirements; this catalog does not assert additional OAuth scopes or OS entitlements.
Full input schema — macOS
{
"properties": {
"confirm": {
"description": "Must be true to act. Without it, returns a preview and changes nothing.",
"type": "boolean"
},
"create": {
"description": "Create the playlist when none has that name (default false).",
"type": "boolean"
},
"playlist": {
"description": "Playlist name or id from music_list_playlists.",
"type": "string"
},
"track_ids": {
"description": "Track ids from music_search_library (at most 100).",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"playlist",
"track_ids"
],
"type": "object"
}Documentation example
Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.
{
"confirm": false,
"create": true,
"playlist": "Demo Focus",
"track_ids": [
"demo-track-001",
"demo-track-002"
]
}