Skip to main content
Glama
metricool

mcp-metricool

Official
by metricool

get_best_time_to_post

Identify optimal posting times for specific social media platforms by analyzing data within a selected period. Input start and end dates, blog ID, provider, and timezone to receive a list of high-value hours and days for maximum engagement.

Instructions

Get the best time to post for a specific provider. The return is a list of hours and days with a value. The higher the value, the best time to post. Try to get the best for as maximum of 1 week. If you have day to publish but not hours, choose the start and end of this day. Args: start: Start date of the period to get the data. The format is YYYY-MM-DD end: End date of the period to get the data. The format is YYYY-MM-DD blog id: Blog id of the Metricool brand account. provider: Provider of the post. The format is "twitter", "facebook", "instagram", "linkedin", "youtube", "tiktok". Only these are accepted. timezone: Timezone of the post. The format is "Europe%2FMadrid". Use the timezone of the user extracted from the get_brands tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blog_idYes
endYes
providerYes
startYes
timezoneYes

Implementation Reference

  • Implements the core logic for the 'get_best_time_to_post' tool: fetches best posting times from Metricool API based on date range, blog ID, provider, and timezone, enhances response with day-of-week names, and handles errors.
    @mcp.tool()
    async def get_best_time_to_post(start: str, end: str, blog_id: int, provider: str, timezone: str) -> str | dict[
        str, Any]:
        """
        Get the best time to post for a specific provider. The return is a list of hours and days with a value. The higher the value, the best time to post.
        Try to get the best for as maximum of 1 week. If you have day to publish but not hours, choose the start and end of this day.
        Args:
         start: Start date of the period to get the data. The format is YYYY-MM-DD
         end: End date of the period to get the data. The format is YYYY-MM-DD
         blog id: Blog id of the Metricool brand account.
         provider: Provider of the post. The format is "twitter", "facebook", "instagram", "linkedin", "youtube", "tiktok". Only these are accepted.
         timezone: Timezone of the post. The format is "Europe%2FMadrid".  Use the timezone of the user extracted from the get_brands tool.
        """
    
        days_of_week = {
            1: "Sunday",
            2: "Monday",
            3: "Tuesday",
            4: "Wednesday",
            5: "Thursday",
            6: "Friday",
            7: "Saturday"
        }
    
        url = f"{METRICOOL_BASE_URL}/v2/scheduler/besttimes/{provider}?start={start}T00%3A00%3A00&end={end}T23%3A59%3A59&timezone={timezone}&blogId={blog_id}&userId={METRICOOL_USER_ID}&integrationSource=MCP"
    
        response = await make_get_request(url)
    
        if not response:
            return ("Failed to get the best time to post")
    
        #Introducir día de la semana
        for entry in response["data"]:
            day_number = entry.get("dayOfWeek")
            entry["dayOfWeekName"] = days_of_week.get(day_number, "Unknown")
    
        return response
  • Registers the 'get_best_time_to_post' tool using the FastMCP @mcp.tool() decorator, which also infers schema from function signature and docstring.
    @mcp.tool()
  • Docstring provides detailed input schema and usage instructions for the tool's parameters.
    str, Any]:
    """
    Get the best time to post for a specific provider. The return is a list of hours and days with a value. The higher the value, the best time to post.
    Try to get the best for as maximum of 1 week. If you have day to publish but not hours, choose the start and end of this day.
    Args:
     start: Start date of the period to get the data. The format is YYYY-MM-DD
     end: End date of the period to get the data. The format is YYYY-MM-DD
     blog id: Blog id of the Metricool brand account.
     provider: Provider of the post. The format is "twitter", "facebook", "instagram", "linkedin", "youtube", "tiktok". Only these are accepted.
     timezone: Timezone of the post. The format is "Europe%2FMadrid".  Use the timezone of the user extracted from the get_brands tool.
    """
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses some behavioral aspects: the return format (list of hours/days with values), the 'higher value = better time' interpretation, and the fallback logic for missing hour data. However, it doesn't mention rate limits, authentication requirements, error conditions, or whether this is a read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and well-structured with a clear purpose statement, return format explanation, usage guidance, and parameter documentation. The 'Args:' section organizes parameter details efficiently. Minor redundancy exists in date format repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (5 parameters, no annotations, no output schema), the description provides good coverage. It explains the return format, parameter semantics, and some behavioral logic. The main gap is lack of output structure details (exact fields, data types) which would be helpful without an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing detailed parameter semantics. It explains all 5 parameters: their purposes, formats, constraints (provider enum values), and even references another tool (get_brands) for timezone extraction. This adds substantial value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the best time to post for a specific provider' with a return format explanation. It specifies the resource (best posting times) and verb (get), but doesn't explicitly differentiate from sibling tools like get_analytics or get_metrics that might also provide timing-related data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some implied usage context: 'Try to get the best for as maximum of 1 week' suggests optimal date range selection, and it references the get_brands tool for timezone extraction. However, it doesn't explicitly state when to use this tool versus alternatives like get_analytics or provide clear exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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