trending_tv
Discover popular TV shows trending today or this week for content analysis and audience insights.
Instructions
Retrieves trending TV shows. Input: time_window (required: day|week), page (optional), language (optional ISO 639-1). Output: JSON with paginated trending results. Purpose: Discover currently popular TV shows for trend analysis by AI agents.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | ||
| page | No | ||
| time_window | Yes |
Implementation Reference
- mcp-tmdb-server.js:660-663 (handler)The asynchronous handler function that executes the 'trending_tv' tool logic: fetches trending TV shows from TMDB API using the provided parameters and returns the data as a JSON string in a content block.handler: async ({time_window, page, language}) => { const data = await tmdbFetch(`/trending/tv/${time_window}`, {page, language}); return {content: [{type: 'text', text: JSON.stringify(data, null, 2)}]}; }
- mcp-tmdb-server.js:650-659 (schema)The input schema defining the parameters for the 'trending_tv' tool: time_window (required, 'day' or 'week'), optional page and language.inputSchema: { type: "object", properties: { time_window: {type: "string", enum: ["day", "week"]}, page: {type: "number", minimum: 1}, language: {type: "string"} }, required: ["time_window"], additionalProperties: false },
- mcp-tmdb-server.js:642-664 (registration)The complete tool definition object for 'trending_tv', including comments, name, description, input schema, and handler, which is included in the 'tools' array for MCP server registration.// Tool: trending_tv // Purpose: Get trending TV shows. // Input: time_window (required: day|week), page (optional), language (optional). // Output: JSON with paginated trending TV results. // Use case: AI agents can identify currently popular TV shows. { name: "trending_tv", description: "Retrieves trending TV shows. Input: time_window (required: day|week), page (optional), language (optional ISO 639-1). Output: JSON with paginated trending results. Purpose: Discover currently popular TV shows for trend analysis by AI agents.", inputSchema: { type: "object", properties: { time_window: {type: "string", enum: ["day", "week"]}, page: {type: "number", minimum: 1}, language: {type: "string"} }, required: ["time_window"], additionalProperties: false }, handler: async ({time_window, page, language}) => { const data = await tmdbFetch(`/trending/tv/${time_window}`, {page, language}); return {content: [{type: 'text', text: JSON.stringify(data, null, 2)}]}; } },