playlist_add
Add files to an existing playlist in the mpv media player. Use this tool to append media files to playlists through natural language commands.
Instructions
Add files to an existing playlist.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Playlist name | |
| files | Yes | Files to append |
Implementation Reference
- index.js:646-652 (handler)The handler for the playlist_add tool which reads an existing playlist file, appends new files to it, and saves the updated list.
case "playlist_add": { const existing = readPlaylist(args.name); writePlaylist(args.name, [...existing, ...args.files]); return ok( `Added ${args.files.length} item(s) to "${args.name}" (total: ${existing.length + args.files.length})` ); } - index.js:446-461 (schema)Definition and input schema for the playlist_add tool.
{ name: "playlist_add", description: "Add files to an existing playlist.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Playlist name" }, files: { type: "array", items: { type: "string" }, description: "Files to append", }, }, required: ["name", "files"], }, },