get_youtube_videos
Retrieve YouTube videos from your Metricool brand account for a specified date range and blog ID, streamlining video data access and analysis.
Instructions
Get the list of Youtube Videos from your Metricool brand account.
Args: init date: Init date of the period to get the data. The format is YYYY-MM-DD end date: End date of the period to get the data. The format is YYYY-MM-DD blog id: Blog id of the Metricool brand account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blog_id | Yes | ||
| end_date | Yes | ||
| init_date | Yes |
Implementation Reference
- src/mcp_metricool/tools/tools.py:306-324 (handler)The core handler implementation for the 'get_youtube_videos' tool. It is registered via the @mcp.tool() decorator and fetches YouTube video analytics data from the Metricool API for a given date range and blog ID. Includes type hints and docstring serving as input schema.@mcp.tool() async def get_youtube_videos(init_date: str, end_date: str, blog_id: int) -> str | dict[str, Any]: """ Get the list of Youtube Videos from your Metricool brand account. Args: init date: Init date of the period to get the data. The format is YYYY-MM-DD end date: End date of the period to get the data. The format is YYYY-MM-DD blog id: Blog id of the Metricool brand account. """ url = f"{METRICOOL_BASE_URL}/v2/analytics/posts/youtube?from={init_date}T00%3A00%3A00&to={end_date}T23%3A59%3A59&blogId={blog_id}&userId={METRICOOL_USER_ID}&integrationSource=MCP" response = await make_get_request(url) if not response: return ("Failed to get Youtube Videos") return response