Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

search_web_content

Search Meta Ads data to find matching record IDs for campaigns, creatives, and ad accounts using targeted queries.

Instructions

Search through Meta Ads data and return matching record IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
meta_access_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `search_web_content` function is registered as an MCP tool and executes the web content search logic using `_data_manager.search_records`.
    @mcp_server.tool()
    @meta_api_tool
    async def search_web_content(
        query: str,
        meta_access_token: Optional[str] = None,
    ) -> str:
        """Search through Meta Ads data and return matching record IDs."""
        if not query:
            return json.dumps({"error": "query parameter is required", "ids": []}, indent=2)
    
        try:
            matching_ids = await _data_manager.search_records(query, meta_access_token)
            return json.dumps(
                {
                    "ids": matching_ids,
                    "query": query,
                    "total_results": len(matching_ids),
                },
                indent=2,
            )
        except Exception as e:
            logger.error(f"Error in search_web_content tool: {e}")
            return json.dumps(
                {
                    "error": "Failed to search_web_content Meta Ads data",
                    "details": str(e),
                    "ids": [],
                    "query": query,
                },
                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 mentions searching and returning 'matching record IDs', which implies a read-only operation, but fails to detail critical aspects like authentication requirements (implied by 'meta_access_token' parameter), rate limits, pagination, or error handling. This leaves significant gaps for a tool interacting with external APIs.

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 no wasted words, clearly front-loading the core purpose. It is appropriately sized for a simple search tool, making it easy to parse quickly.

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's moderate complexity (2 parameters, external API interaction) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and low schema coverage, it lacks crucial context like authentication, search scope, and behavioral traits, making it incomplete for safe and effective use.

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 does not explain the 'query' parameter's format or semantics (e.g., search syntax, fields searched) or the 'meta_access_token' usage (e.g., when required, how to obtain it). The description adds no meaningful details beyond what the bare schema provides.

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 ('Search through') and resource ('Meta Ads data'), specifying the action and target. It distinguishes from siblings like 'search_ads_archive' or 'search_pages' by focusing on 'web content', though it doesn't explicitly contrast them. However, it's not fully specific about what 'web content' entails compared to other search tools.

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 'search_ads_archive' or 'search_pages', nor does it mention prerequisites such as authentication needs. It lacks explicit context for selection among the many search-related sibling 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

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