Skip to main content
Glama

get_playlists

Retrieve all playlists from your Plex Media Server library.

Instructions

Get all Plex playlists

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The getPlaylists() method on PlexTools class - makes a GET request to /playlists endpoint and returns formatted playlist data including ratingKey, title, type, playlistType, smart flag, leafCount, duration, summary, and timestamps.
    async getPlaylists(): Promise<MCPResponse> {
      const data = await this.client.makeRequest("/playlists");
      const container = data as { MediaContainer?: { Metadata?: Record<string, unknown>[] } };
      const playlists = container.MediaContainer?.Metadata || [];
    
      return jsonResponse({
        playlists: playlists.map((playlist) => ({
          ratingKey: playlist.ratingKey,
          key: playlist.key,
          title: playlist.title,
          type: playlist.type,
          playlistType: playlist.playlistType,
          smart: playlist.smart,
          leafCount: playlist.leafCount,
          duration: playlist.duration,
          summary: playlist.summary ? truncate(String(playlist.summary), SUMMARY_PREVIEW_LENGTH) : undefined,
          updatedAt: playlist.updatedAt,
          addedAt: playlist.addedAt,
        })),
      });
    }
  • Registers the 'get_playlists' tool with the registry, wiring it to call tools.getPlaylists() with no arguments.
    registry.register("get_playlists", () => tools.getPlaylists());
  • Defines the GET_PLAYLISTS_SCHEMA with name 'get_playlists', description 'Get all Plex playlists', and an empty inputSchema (no parameters required).
    const GET_PLAYLISTS_SCHEMA = {
      name: "get_playlists",
      description: "Get all Plex playlists",
      inputSchema: {
        type: "object" as const,
        properties: {},
      },
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, required permissions, or any side effects. It only states the action, leaving the agent to infer safety and behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at four words, with no unnecessary information. Every word is meaningful and directly states the tool's purpose. It is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no parameters and no output schema, the description is minimally adequate. However, given the presence of many sibling getters, additional context about the scope (e.g., 'all playlists from the user's library') or behavior (e.g., returns list, no pagination) would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is nothing to document beyond the schema. With 100% schema coverage (vacuously), the description adds no parameter info, but baseline for zero parameters is 4. It cannot add more value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (get) and resource (all Plex playlists). It is specific enough to distinguish from sibling tools like get_playlist_items which lists items within a playlist. However, it does not explicitly differentiate from other getters like get_libraries, but the resource name makes it distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, limitations, or scenarios where this tool is appropriate. The description assumes the agent will know when to call it without context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/niavasha/plex-mcp-server'

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