Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

read_ad_account

Retrieve metadata for a specific Meta ad account to access account details and configuration information for campaign management.

Instructions

Return account metadata for a single ad account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_account_idYes
meta_access_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the read_ad_account tool, which fetches metadata for a specific Meta Ad Account and includes normalization and error handling.
    async def read_ad_account(ad_account_id: str, meta_access_token: Optional[str] = None) -> str:
        """Return account metadata for a single ad account."""
        normalized_account_id = _normalize_account_id(ad_account_id)
        if not normalized_account_id:
            return json.dumps(
                {
                    "error": {
                        "message": "Account ID is required",
                        "details": "Please specify an ad_account_id parameter",
                        "example": "Use ad_account_id='act_123456789' or ad_account_id='123456789'",
                    }
                },
                indent=2,
            )
    
        payload = await make_api_request(
            normalized_account_id,
            meta_access_token,
            {
                "fields": (
                    "id,name,account_id,account_status,amount_spent,balance,currency,age,"
                    "business_city,business_country_code,timezone_name"
                )
            },
        )
    
        if isinstance(payload, dict) and payload.get("error") and _looks_like_access_error(payload):
            accounts_payload = await _list_accessible_accounts(meta_access_token)
            if isinstance(accounts_payload, dict) and isinstance(accounts_payload.get("data"), list):
                visible = [
                    {"id": item.get("id"), "name": item.get("name")}
                    for item in accounts_payload["data"]
                    if isinstance(item, dict)
                ]
                return json.dumps(
                    {
                        "error": {
                            "message": f"Account {normalized_account_id} is not accessible to your user account",
                            "details": "This account either doesn't exist or you don't have permission to access it",
                            "accessible_accounts": visible[:10],
                            "total_accessible_accounts": len(visible),
                            "suggestion": "Try using one of the accessible account IDs listed above",
                        }
                    },
                    indent=2,
                )
    
        if isinstance(payload, dict) and not payload.get("error"):
            _normalize_money_fields(payload)
            country = str(payload.get("business_country_code", "")).upper()
            payload["dsa_required"] = country in _EU_DSA_COUNTRIES
            payload["dsa_compliance_note"] = (
                "This account is subject to European DSA (Digital Services Act) requirements"
                if payload["dsa_required"]
                else "This account is not subject to European DSA requirements"
            )
    
        return json.dumps(payload, indent=2)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns metadata but does not specify details like response format, error handling, authentication requirements (beyond the optional token parameter), rate limits, or whether it's a read-only operation. This leaves significant gaps in understanding how the tool behaves.

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, direct sentence with no wasted words, making it highly concise and front-loaded. It immediately conveys the core function without unnecessary elaboration, which is efficient for quick understanding.

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 the tool has an output schema (which should cover return values) and no annotations, the description is minimally adequate for a simple read operation. However, it lacks details on usage context, parameter meanings, and behavioral traits, making it incomplete for effective agent use without additional inference or trial.

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 for undocumented parameters. It mentions 'account metadata' but does not explain what 'ad_account_id' represents (e.g., format, source) or the purpose of 'meta_access_token' (e.g., when it's required, how to obtain it). This fails to add meaningful context 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 action ('Return') and resource ('account metadata for a single ad account'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'list_ad_accounts' or 'read_ad', which also retrieve ad account data, leaving room for ambiguity in tool selection.

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, such as 'list_ad_accounts' for multiple accounts or other 'read_' tools for different resources. It lacks context on prerequisites, like when 'meta_access_token' is needed, or exclusions, making it insufficient for informed tool selection.

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