Skip to main content
Glama
llnOrmll

World Bank Data360 MCP Server

by llnOrmll

list_popular_indicators

Discover commonly requested World Bank indicators across demographics, economy, health, education, and other categories to identify relevant data for analysis without manual searching.

Instructions

Get a curated list of popular World Bank indicators.

    This tool helps users discover commonly requested indicators without searching.
    Perfect for getting started or exploring what data is available.

    Categories included:
    - Demographics: Population, growth rate, density, fertility
    - Economy: GDP, GDP per capita, growth, inflation, trade
    - Health: Life expectancy, mortality rates (infant, under-5, maternal)
    - Education: Literacy rates, school enrollment
    - Labor: Unemployment, labor force participation, employment ratios
    - Poverty & Inequality: Poverty rates, Gini index, income distribution
    - Environment: Greenhouse gas emissions, forest area, renewable energy
    - Infrastructure: Electricity access, water, sanitation
    - Technology: Internet usage, mobile subscriptions, broadband

    Returns: List of 38 curated indicators with codes, names, descriptions, and categories.

    Usage: Browse the list, pick an indicator code, then use search_datasets
    to find the exact database ID before retrieving data.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'list_popular_indicators' tool. Loads popular indicators from JSON, groups by category, and returns structured response. Registered via @server.tool() decorator.
    @server.tool()
    def list_popular_indicators() -> dict[str, Any]:
        """Get a curated list of popular World Bank indicators.
    
        This tool helps users discover commonly requested indicators without searching.
        Perfect for getting started or exploring what data is available.
    
        Categories included:
        - Demographics: Population, growth rate, density, fertility
        - Economy: GDP, GDP per capita, growth, inflation, trade
        - Health: Life expectancy, mortality rates (infant, under-5, maternal)
        - Education: Literacy rates, school enrollment
        - Labor: Unemployment, labor force participation, employment ratios
        - Poverty & Inequality: Poverty rates, Gini index, income distribution
        - Environment: Greenhouse gas emissions, forest area, renewable energy
        - Infrastructure: Electricity access, water, sanitation
        - Technology: Internet usage, mobile subscriptions, broadband
    
        Returns: List of 38 curated indicators with codes, names, descriptions, and categories.
    
        Usage: Browse the list, pick an indicator code, then use search_datasets
        to find the exact database ID before retrieving data.
        """
        indicators = load_popular_indicators()
    
        if not indicators:
            return {
                "success": False,
                "error": "Popular indicators file not found. Please ensure popular_indicators.json exists."
            }
    
        # Group by category for better organization
        by_category = {}
        for ind in indicators:
            category = ind.get("category", "Other")
            if category not in by_category:
                by_category[category] = []
            by_category[category].append({
                "code": ind["code"],
                "name": ind["name"],
                "description": ind["description"][:150] + "..." if len(ind["description"]) > 150 else ind["description"]
            })
    
        return {
            "success": True,
            "total_indicators": len(indicators),
            "categories": list(by_category.keys()),
            "indicators_by_category": by_category,
            "note": "These are the most commonly requested indicators. Use search_local_indicators for more specific searches."
        }
  • Helper function that loads and caches the popular indicators data from the local JSON file 'popular_indicators.json'.
    def load_popular_indicators() -> list[dict[str, Any]]:
        """Load curated popular indicators from JSON file (cached)"""
        global _popular_cache
    
        if _popular_cache is None:
            popular_path = Path(__file__).parent / "popular_indicators.json"
            try:
                with open(popular_path, 'r', encoding='utf-8') as f:
                    data = json.load(f)
                    _popular_cache = data["indicators"]
            except Exception as e:
                # Return empty list if file not found or error
                _popular_cache = []
    
        return _popular_cache

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/llnOrmll/world-bank-data-mcp'

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