Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYesPlaylist name
filesYesFiles to append

Implementation Reference

  • 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})`
      );
    }
  • 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"],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/guodaxia9527/mcp-mpv-player'

If you have feedback or need assistance with the MCP directory API, please join our Discord server