Skip to main content
Glama

trending_movies

Discover currently popular movies by retrieving trending titles from The Movie Database for daily or weekly trend analysis.

Instructions

Retrieves trending movies. Input: time_window (required: day|week), page (optional), language (optional ISO 639-1), region (optional ISO 3166-1), include_adult (optional boolean). Output: JSON with paginated trending results. Purpose: Discover currently popular movies for trend analysis by AI agents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_adultNo
languageNo
pageNo
regionNo
time_windowYes

Implementation Reference

  • The main handler function for the 'trending_movies' tool. It calls the TMDB API endpoint `/trending/movie/${time_window}` with provided parameters, fetches the data, stringifies it to JSON, and returns it as text content in the MCP response format.
    handler: async ({time_window, page, language, region, include_adult}) => { const data = await tmdbFetch(`/trending/movie/${time_window}`, {page, language, region, include_adult}); return {content: [{type: 'text', text: JSON.stringify(data, null, 2)}]}; }
  • The input schema defining the parameters for the 'trending_movies' tool: required 'time_window' ("day" or "week"), optional 'page', 'language', 'region', 'include_adult'.
    inputSchema: { type: "object", properties: { time_window: {type: "string", enum: ["day", "week"]}, page: {type: "number", minimum: 1}, language: {type: "string"}, region: {type: "string"}, include_adult: {type: "boolean"} }, required: ["time_window"], additionalProperties: false },
  • The tool registration object added to the 'tools' array, which includes name, description, inputSchema, and handler. This array is used by the MCP server to list and dispatch tools via ListToolsRequest and CallToolRequest handlers.
    { name: "trending_movies", description: "Retrieves trending movies. Input: time_window (required: day|week), page (optional), language (optional ISO 639-1), region (optional ISO 3166-1), include_adult (optional boolean). Output: JSON with paginated trending results. Purpose: Discover currently popular movies 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"}, region: {type: "string"}, include_adult: {type: "boolean"} }, required: ["time_window"], additionalProperties: false }, handler: async ({time_window, page, language, region, include_adult}) => { const data = await tmdbFetch(`/trending/movie/${time_window}`, {page, language, region, include_adult}); return {content: [{type: 'text', text: JSON.stringify(data, null, 2)}]}; } },

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/drakonkat/wizzy-mcp-tmdb'

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