Skip to main content
Glama

get_recently_added

Retrieve the most recently added media items from your Plex library using a numerical limit to control the number of results returned.

Instructions

Get recently added media

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of items to return (default: 10)

Implementation Reference

  • The primary handler function that fetches recently added media from the Plex /library/recentlyAdded API endpoint, extracts metadata, and returns a formatted JSON response containing ratingKey, title, type, year, addedAt, and summary for each item.
    private async getRecentlyAdded(limit: number) {
      const data = await this.makeRequest("/library/recentlyAdded", { 
        "X-Plex-Container-Start": 0,
        "X-Plex-Container-Size": limit,
      });
      const items = data.MediaContainer?.Metadata || [];
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              recentlyAdded: items.map((item: any) => ({
                ratingKey: item.ratingKey,
                title: item.title,
                type: item.type,
                year: item.year,
                addedAt: item.addedAt,
                summary: item.summary,
              })),
            }, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the tool, specifying an optional 'limit' parameter of type number with default value 10.
    name: "get_recently_added",
    description: "Get recently added media",
    inputSchema: {
      type: "object",
      properties: {
        limit: {
          type: "number",
          description: "Number of items to return (default: 10)",
          default: 10,
        },
      },
    },
  • src/index.ts:272-273 (registration)
    Registration and dispatching logic in the CallToolRequestSchema handler's switch statement, which extracts the limit argument and calls the getRecentlyAdded handler method.
    case "get_recently_added":
      return await this.getRecentlyAdded(((args as any)?.limit as number) || 10);
  • src/index.ts:74-87 (registration)
    Tool registration entry in the ListToolsRequestSchema response, defining the tool name, description, and input schema for discovery.
    {
      name: "get_recently_added",
      description: "Get recently added media",
      inputSchema: {
        type: "object",
        properties: {
          limit: {
            type: "number",
            description: "Number of items to return (default: 10)",
            default: 10,
          },
        },
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but does not reveal any behavioral traits such as whether it's read-only, requires authentication, has rate limits, or what the return format looks like (e.g., list, pagination). This leaves critical operational details unspecified.

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 with a single sentence ('Get recently added media'), which is front-loaded and wastes no words. It efficiently conveys the core purpose without unnecessary elaboration, earning full marks for brevity and clarity.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns a list of media items. It does not explain what 'recently added' entails (e.g., time window, sorting), the structure of returned data, or error conditions. For a tool with no structured support, more contextual detail is needed.

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

Parameters3/5

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

The input schema has 100% description coverage for its single parameter ('limit'), fully documenting its purpose and default value. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline of 3 where the schema handles the heavy lifting.

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

Purpose3/5

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

The description 'Get recently added media' clearly states the verb ('Get') and resource ('recently added media'), establishing a basic purpose. However, it lacks specificity about what 'recently added' means (e.g., timeframe, source) and does not differentiate from siblings like 'get_recently_watched' or 'get_on_deck', leaving ambiguity about scope.

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. For example, it does not clarify if this is for new items across all libraries or specific contexts, nor does it mention prerequisites or exclusions. The agent must infer usage from the name alone, which is insufficient.

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

Related 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