get_pinterest_pins
Retrieve Pinterest Pins from your Metricool brand account by specifying a date range and blog ID to analyze and manage your Pinterest content effectively.
Instructions
Get the list of Pinterest Pins 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:286-304 (handler)The core handler function for the 'get_pinterest_pins' tool. It is decorated with @mcp.tool() which registers it with the FastMCP server. The function fetches Pinterest pins data from the Metricool API using a GET request based on the provided date range and blog_id.@mcp.tool() async def get_pinterest_pins(init_date: str, end_date: str, blog_id: int) -> str | dict[str, Any]: """ Get the list of Pinterest Pins 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/pinterest?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 Pinterest Pins") return response