Skip to main content
Glama

get_twitch_videos

Retrieve Twitch videos from your Metricool account by specifying a date range and blog ID. Simplify data extraction for analysis or reporting.

Instructions

Get the list of Twitch Videos from your Metricool account.

Args: init date: Init date of the period to get the data. The format is YYYYMMDD end date: End date of the period to get the data. The format is YYYYMMDD blog id: Blog id of the Metricool brand account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blog_idYes
end_dateYes
init_dateYes

Implementation Reference

  • Handler function decorated with @mcp.tool() which registers it as an MCP tool. Implements logic to fetch Twitch videos data from Metricool API via HTTP GET request.
    @mcp.tool() async def get_twitch_videos(init_date: str, end_date: str, blog_id: int) -> str | dict[str, Any]: """ Get the list of Twitch Videos from your Metricool account. Args: init date: Init date of the period to get the data. The format is YYYYMMDD end date: End date of the period to get the data. The format is YYYYMMDD blog id: Blog id of the Metricool brand account. """ url = f"{METRICOOL_BASE_URL}/stats/twitch/videos?start={init_date}&end={end_date}&blogId={blog_id}&userId={METRICOOL_USER_ID}&integrationSource=MCP" response = await make_get_request(url) if not response: return ("Failed to get Twitch Videos") return response
  • The @mcp.tool() decorator registers the get_twitch_videos function as an MCP tool in the FastMCP server.
    @mcp.tool() async def get_twitch_videos(init_date: str, end_date: str, blog_id: int) -> str | dict[str, Any]: """ Get the list of Twitch Videos from your Metricool account. Args: init date: Init date of the period to get the data. The format is YYYYMMDD end date: End date of the period to get the data. The format is YYYYMMDD blog id: Blog id of the Metricool brand account. """ url = f"{METRICOOL_BASE_URL}/stats/twitch/videos?start={init_date}&end={end_date}&blogId={blog_id}&userId={METRICOOL_USER_ID}&integrationSource=MCP" response = await make_get_request(url) if not response: return ("Failed to get Twitch Videos") return response
  • Docstring provides input schema description for the tool parameters: init_date (YYYYMMDD), end_date (YYYYMMDD), blog_id (int). Return type: str | dict[str, Any].
    """ Get the list of Twitch Videos from your Metricool account. Args: init date: Init date of the period to get the data. The format is YYYYMMDD end date: End date of the period to get the data. The format is YYYYMMDD blog id: Blog id of the Metricool brand account. """
  • Imports make_get_request utility used to perform the API request in the handler.
    from mcp_metricool.utils.utils import make_get_request

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/metricool/mcp-metricool'

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