Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

list_ad_accounts

Retrieve all accessible Meta ad accounts for a user to manage campaigns, targeting, and reporting through the Meta Marketing API.

Instructions

List ad accounts visible to a user context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
meta_access_tokenNo
meta_user_idNome
page_sizeNo
page_cursorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `list_ad_accounts` function, registered as an MCP tool, fetches ad accounts for a given user from the Meta API, normalizes currency fields, and returns the response as a JSON string.
    async def list_ad_accounts(
        meta_access_token: Optional[str] = None,
        meta_user_id: str = "me",
        page_size: int = 200,
        page_cursor: str = "",
    ) -> str:
        """List ad accounts visible to a user context."""
        params: Dict[str, Any] = {
            "fields": (
                "id,name,account_id,account_status,amount_spent,balance,currency,"
                "age,business_city,business_country_code"
            ),
            "page_size": int(page_size),
        }
        if page_cursor:
            params["page_cursor"] = page_cursor
    
        payload = await make_api_request(f"{meta_user_id}/adaccounts", meta_access_token, params)
    
        if isinstance(payload, dict) and isinstance(payload.get("data"), list):
            payload["data"] = [
                _normalize_money_fields(item) if isinstance(item, dict) else item
                for item in payload["data"]
            ]
    
        return json.dumps(payload, indent=2)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions visibility to a user context, hinting at access control, but fails to disclose key behaviors like pagination (implied by parameters), rate limits, authentication needs, or response format. This leaves significant gaps for a tool with 4 parameters and an output schema.

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, efficient sentence with zero waste. It is front-loaded and appropriately sized for its purpose, making it highly concise and well-structured.

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

Completeness3/5

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

Given 4 parameters with 0% schema coverage, no annotations, and an output schema (which reduces need to describe returns), the description is incomplete. It covers the basic purpose but lacks parameter explanations, usage context, and behavioral details, making it minimally adequate but with clear gaps.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It adds no meaning beyond the schema, failing to explain parameters like 'meta_access_token' (authentication), 'meta_user_id' (default 'me'), 'page_size', or 'page_cursor' (pagination). This inadequately addresses the coverage gap.

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 verb ('List') and resource ('ad accounts'), specifying the scope as 'visible to a user context.' It distinguishes from siblings like 'read_ad_account' (singular read) but doesn't explicitly differentiate from other list tools (e.g., 'list_ads'), making it a 4 rather than a 5.

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 'read_ad_account' or other list tools. It lacks prerequisites, exclusions, or context for selection, offering only a basic functional statement.

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

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/EfrainTorres/armavita-meta-ads-mcp'

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