Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

read_web_content

Fetch complete web content records by ID using cache-first retrieval with API fallback for reliable data access in Meta Ads management.

Instructions

Fetch complete record data by ID using cache-first + API fallback behavior.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_idYes

Implementation Reference

  • The handler implementation for the 'read_web_content' tool, which fetches record data by ID using a cache-first approach with an API fallback.
    async def read_web_content(resource_id: str) -> str:
        """Fetch complete record data by ID using cache-first + API fallback behavior."""
        if not resource_id:
            return json.dumps({"error": "resource_id parameter is required"}, indent=2)
    
        meta_access_token: Optional[str] = None
        try:
            meta_access_token = await auth.get_current_access_token()
        except Exception as token_error:
            logger.debug(f"No access token for read_web_content fallback: {token_error}")
    
        try:
            record = await _data_manager.fetch_record(resource_id, meta_access_token)
            if record:
                logger.info(f"Record fetched successfully: {resource_id}")
                return json.dumps(record, indent=2)
    
            return json.dumps({"error": f"Record not found: {resource_id}", "resource_id": resource_id}, indent=2)
        except ValueError as value_error:
            return json.dumps(
                {
                    "error": "invalid_record_id",
                    "details": str(value_error),
                    "supported_prefixes": list(_SUPPORTED_PREFIXES),
                    "resource_id": resource_id,
                },
                indent=2,
            )
        except Exception as e:
            logger.error(f"Error in read_web_content tool: {e}")
            return json.dumps(
                {
                    "error": "Failed to read_web_content record",
                    "details": str(e),
                    "resource_id": resource_id,
  • The registration of the 'read_web_content' tool within the core package.
    "read_web_content",

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