Skip to main content
Glama

playlist_create

Create a new playlist by specifying a name and adding file paths or URLs for media playback in mpv player.

Instructions

Create a new playlist with a list of file paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPlaylist name
filesYesArray of absolute file paths or URLs

Implementation Reference

  • The handler implementation for the playlist_create tool.
    case "playlist_create": {
      if (!args.files || args.files.length === 0)
        return fail("files array cannot be empty");
      writePlaylist(args.name, args.files);
      return ok(
        `Created playlist "${args.name}" with ${args.files.length} item(s)\nSaved to: ${playlistPath(args.name)}`
      );
    }
  • index.js:431-444 (registration)
    The tool definition and registration for playlist_create.
    name: "playlist_create",
    description: "Create a new playlist with a list of file paths.",
    inputSchema: {
      type: "object",
      properties: {
        name: { type: "string", description: "Playlist name" },
        files: {
          type: "array",
          items: { type: "string" },
          description: "Array of absolute file paths or URLs",
        },
      },
      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