Skip to main content
Glama
metricool

mcp-metricool

Official
by metricool

get_brands

Retrieve a comprehensive list of brands linked to your Metricool account for streamlined account management and analysis.

Instructions

Get the list of brands from your Metricool account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_brands' tool, decorated with @mcp.tool() for automatic registration in FastMCP. It retrieves the list of brands from the Metricool API, simplifies the data (label, id, userId, networks, timezone), and returns it as a list of dictionaries.
    @mcp.tool()
    async def get_brands() -> list[dict[str, Any]]:
        """
        Get the list of brands from your Metricool account.
        """
    
        url = f"{METRICOOL_BASE_URL}/v2/settings/brands?userId={METRICOOL_USER_ID}&integrationSource=MCP"
    
        response = await make_get_request(url)
        if not response:
            return ("Failed to get brands")
        result = []
        dicts = response["data"]
        for item in dicts:
            simplified = {
                "label": item.get("label"),
                "id": item.get("id"),
                "userId": item.get("userId"),
                "networks": item.get("networksData"),
                "timezone": item.get("timezone")
            }
            result.append(simplified)
        return result
  • Supporting utility function 'make_get_request' called by get_brands to perform authenticated HTTP GET requests to the Metricool API, handling errors and returning JSON or None.
    async def make_get_request(url: str) -> dict[str, Any] | None:
        """Make a get request to the Metricool API with proper error handling."""
        headers = {
            "X-Mc-Auth": METRICOOL_USER_TOKEN,
        }
        async with httpx.AsyncClient() as client:
            try:
                response = await client.get(url, headers=headers, timeout=30.0)
                response.raise_for_status()
                return response.json()
            except Exception:
                return None
  • Registers and runs the MCP server by importing the tools module (which defines and decorates the tools) and calling mcp.run(), making the get_brands tool available via stdio transport.
    from .tools import tools
    
    mcp = tools.mcp
    
    if __name__ == "__main__":
        # Initialize and run the server
        mcp.run(transport='stdio')
  • Alternative helper tool 'get_brands_complete' that returns full API response with additional instructions, but documentation instructs to prefer 'get_brands'.
    @mcp.tool()
    async def get_brands_complete() -> str | dict[str, Any]:
        """
        Get the list of brands from your Metricool account. Only use this tool if the user asks specifically for his brands, in every other case
        use get_brands.
        Add to the result that the only networks with competitors are Instagram, Facebook, Twitch, YouTube, Twitter, and Bluesky.
        """
    
        url = f"{METRICOOL_BASE_URL}/v2/settings/brands?userId={METRICOOL_USER_ID}&integrationSource=MCP"
    
        response = await make_get_request(url)
    
        if not response:
            return ("Failed to get brands")
    
        return {
        "brands": response,
        "instructions": (
            "Explain that only Instagram, Facebook, Twitch, YouTube, Twitter, and Bluesky support competitors. "
        )
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it retrieves a list but doesn't mention whether this requires authentication, has rate limits, returns paginated results, or what format the output takes. This leaves significant gaps for an agent to understand how to use it effectively.

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

Conciseness5/5

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

The description is a single, clear sentence with no wasted words. It's front-loaded with the core purpose and efficiently communicates the essential information without unnecessary elaboration.

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

Completeness2/5

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

For a tool with no annotations, no output schema, and a simple purpose, the description is too minimal. It doesn't explain what 'brands' are in this context, what the returned list contains, or any behavioral aspects like authentication needs. Given the lack of structured data, more context would help the agent.

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

Parameters4/5

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

The tool has zero parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter information, and it appropriately doesn't mention any parameters, earning a high baseline score.

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 action ('Get') and resource ('list of brands from your Metricool account'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tool 'get_brands_complete', which appears to serve a similar function, preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_brands_complete' or other data retrieval tools in the sibling list. It lacks context about prerequisites, timing, or comparison with similar tools.

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