discover_by_provider
Find movies and TV shows available on specific streaming services in your region to help you discover content you can watch immediately.
Instructions
Discovers movies or TV shows available on specific streaming providers in a region. Input: type (optional: tv|movie, default tv), with_watch_providers (required comma-separated provider IDs), watch_region (required ISO 3166-1), language (optional ISO 639-1, default en), page (optional), sort_by (optional). Output: JSON with paginated results. Purpose: Personalized content discovery based on streaming availability for AI agents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | ISO 639-1 language (e.g., en) | |
| page | No | Page number | |
| sort_by | No | Sort order (e.g., release_date.desc, first_air_date.desc, popularity.desc) | |
| type | No | Media type to discover: tv (default) or movie | |
| watch_region | Yes | ISO 3166-1 region code (e.g., IS) | |
| with_watch_providers | Yes | Provider ID(s), comma-separated (e.g., '8'), from service get_watch_providers |
Implementation Reference
- mcp-tmdb-server.js:438-454 (handler)The async handler function that executes the tool logic by calling the TMDB /discover/{type} API endpoint with parameters for filtering by watch providers in a specific region.handler: async ({ type = "tv", with_watch_providers, watch_region, language = "en", page = 1, sort_by = "release_date.desc" }) => { const data = await tmdbFetch(`/discover/${type}`, { language, page, with_watch_providers, sort_by, watch_region }); return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]}; }
- mcp-tmdb-server.js:415-437 (schema)The inputSchema JSON Schema object defining the expected input parameters, types, descriptions, and requirements for the tool.inputSchema: { type: "object", properties: { type: { type: "string", enum: ["tv", "movie"], description: "Media type to discover: tv (default) or movie" }, with_watch_providers: { type: "string", description: "Provider ID(s), comma-separated (e.g., '8'), from service get_watch_providers" }, watch_region: {type: "string", description: "ISO 3166-1 region code (e.g., IS)"}, language: {type: "string", description: "ISO 639-1 language (e.g., en)"}, page: {type: "number", minimum: 1, description: "Page number"}, sort_by: { type: "string", description: "Sort order (e.g., release_date.desc, first_air_date.desc, popularity.desc)" } }, required: ["with_watch_providers", "watch_region"], additionalProperties: false },
- mcp-tmdb-server.js:412-455 (registration)The complete tool object definition within the 'tools' array, which serves as the registration point for the MCP server to list and invoke this tool via name matching.{ name: "discover_by_provider", description: "Discovers movies or TV shows available on specific streaming providers in a region. Input: type (optional: tv|movie, default tv), with_watch_providers (required comma-separated provider IDs), watch_region (required ISO 3166-1), language (optional ISO 639-1, default en), page (optional), sort_by (optional). Output: JSON with paginated results. Purpose: Personalized content discovery based on streaming availability for AI agents.", inputSchema: { type: "object", properties: { type: { type: "string", enum: ["tv", "movie"], description: "Media type to discover: tv (default) or movie" }, with_watch_providers: { type: "string", description: "Provider ID(s), comma-separated (e.g., '8'), from service get_watch_providers" }, watch_region: {type: "string", description: "ISO 3166-1 region code (e.g., IS)"}, language: {type: "string", description: "ISO 639-1 language (e.g., en)"}, page: {type: "number", minimum: 1, description: "Page number"}, sort_by: { type: "string", description: "Sort order (e.g., release_date.desc, first_air_date.desc, popularity.desc)" } }, required: ["with_watch_providers", "watch_region"], additionalProperties: false }, handler: async ({ type = "tv", with_watch_providers, watch_region, language = "en", page = 1, sort_by = "release_date.desc" }) => { const data = await tmdbFetch(`/discover/${type}`, { language, page, with_watch_providers, sort_by, watch_region }); return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]}; } },