Skip to main content
Glama

get_scheduled_posts

Retrieve scheduled posts for a Metricool brand account within a specified date range and timezone. Extend search range if needed to access unpublished posts efficiently.

Instructions

Get the list of scheduled posts for a specific Metricool brand (blog_id). Only retrieves posts that are scheduled (not yet published). If the user doesn't provide a blog_id, ask for it.

Args: blog_id: Blog id of the Metricool brand account. 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 timezone: Timezone of the post. The format is "Europe%2FMadrid". Use the timezone of the user extracted from the get_brands tool. extendedRange: When it's true, search date range is expanded one day after and one day before. Default value is false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blog_idYes
endYes
extendedRangeYes
startYes
timezoneYes

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the logic for retrieving scheduled posts from the Metricool API using a GET request to the scheduler/posts endpoint.
    @mcp.tool() async def get_scheduled_posts(blog_id: int, start: str, end: str, timezone: str, extendedRange: bool) -> str | dict[str, Any]: """ Get the list of scheduled posts for a specific Metricool brand (blog_id). Only retrieves posts that are scheduled (not yet published). If the user doesn't provide a blog_id, ask for it. Args: blog_id: Blog id of the Metricool brand account. 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 timezone: Timezone of the post. The format is "Europe%2FMadrid". Use the timezone of the user extracted from the get_brands tool. extendedRange: When it's true, search date range is expanded one day after and one day before. Default value is false. """ url = f"{METRICOOL_BASE_URL}/v2/scheduler/posts?blogId={blog_id}&userId={METRICOOL_USER_ID}&integrationSource=MCP&start={start}T00%3A00%3A00&end={end}T23%3A59%3A59&timezone={timezone}&extendedRange={extendedRange}" response = await make_get_request(url) if not response: return "Failed to get scheduled posts" return response
  • Initialization of the FastMCP server instance 'metricool'. All tools, including get_scheduled_posts, are registered to this instance via @mcp.tool() decorators.
    mcp = FastMCP("metricool")
  • Imports the tools module which triggers the registration of all @mcp.tool() functions, including get_scheduled_posts, upon import.
    from .tools import tools
  • Docstring providing detailed input parameter descriptions and usage instructions, serving as the tool schema.
    """ Get the list of scheduled posts for a specific Metricool brand (blog_id). Only retrieves posts that are scheduled (not yet published). If the user doesn't provide a blog_id, ask for it. Args: blog_id: Blog id of the Metricool brand account. 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 timezone: Timezone of the post. The format is "Europe%2FMadrid". Use the timezone of the user extracted from the get_brands tool. extendedRange: When it's true, search date range is expanded one day after and one day before. Default value is false. """

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