get_on_deck
Retrieve 'Continue Watching' items from your Plex Media Server using AI-powered natural language queries through the Plex MCP Server.
Instructions
Get on deck (continue watching) items
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:571-592 (handler)The handler function that fetches 'on deck' (continue watching) items from the Plex API endpoint '/library/onDeck', extracts metadata, and returns a formatted JSON response with relevant fields like ratingKey, title, progress info.private async getOnDeck() { const data = await this.makeRequest("/library/onDeck"); const items = data.MediaContainer?.Metadata || []; return { content: [ { type: "text", text: JSON.stringify({ onDeck: items.map((item: any) => ({ ratingKey: item.ratingKey, title: item.title, type: item.type, viewOffset: item.viewOffset, duration: item.duration, lastViewedAt: item.lastViewedAt, })), }, null, 2), }, ], }; }
- src/index.ts:88-95 (registration)Tool registration in the ListTools response, including name, description, and empty inputSchema (no parameters required).{ name: "get_on_deck", description: "Get on deck (continue watching) items", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:91-94 (schema)Input schema definition: an empty object, indicating the tool takes no parameters.inputSchema: { type: "object", properties: {}, },
- src/index.ts:274-275 (registration)Dispatch/registration in the CallToolRequestHandler switch statement, mapping the tool name to the getOnDeck handler method.case "get_on_deck": return await this.getOnDeck();