Skip to main content
Glama

show_world_intel

Retrieve global macro data and active disaster alerts for risk assessment. Combines World Bank indicators with GDACS alerts—no API keys needed.

Instructions

Global intelligence drill-down: World Bank macro (GDP growth, inflation, unemployment per country) + GDACS active disasters (Orange/Red alerts). No API keys required. Use after get_brief when you need more detail on global risks — e.g. 'which countries are in recession', 'any active crises affecting my holdings', 'compare inflation across major economies'. Shows all currently active alerts, Orange+ by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countriesNoISO 2-letter country codes for macro data
min_alert_levelNoMinimum disaster alert levelOrange

Implementation Reference

  • MCP tool handler for 'show_world_intel'. Registers via server.tool() with Zod schema for countries (default: US,CN,JP,KR,DE,IN,GB) and min_alert_level (default: Orange). Handler calls fetchGlobalMacro() and fetchDisasters() in parallel and returns combined result with generated_at timestamp.
    server.tool(
      'show_world_intel',
      "Global intelligence drill-down: World Bank macro (GDP growth, inflation, unemployment per country) + GDACS active disasters (Orange/Red alerts). No API keys required. Use after get_brief when you need more detail on global risks — e.g. 'which countries are in recession', 'any active crises affecting my holdings', 'compare inflation across major economies'. Shows all currently active alerts, Orange+ by default.",
      {
        countries: z
          .array(z.string())
          .default(['US', 'CN', 'JP', 'KR', 'DE', 'IN', 'GB'])
          .describe('ISO 2-letter country codes for macro data'),
        min_alert_level: z
          .enum(['Green', 'Orange', 'Red'])
          .default('Orange')
          .describe('Minimum disaster alert level'),
      },
      async ({ countries, min_alert_level }) => {
        try {
          const [macro, disasters] = await Promise.all([
            fetchGlobalMacro(countries),
            fetchDisasters({ minAlertLevel: min_alert_level as AlertLevel }),
          ]);
          return ok({
            generated_at: new Date().toISOString(),
            global_macro: { source: 'World Bank', data: macro },
            disasters: { source: 'GDACS', count: disasters.length, events: disasters },
          });
        } catch (e) {
          return err(e instanceof Error ? e.message : 'Failed to fetch world intelligence');
        }
      },
    );
  • Registration of the macro tools (including show_world_intel) on the MCP server via registerMacroTools(server).
    registerMacroTools(server);
    registerAdminTools(server);
    registerPrompts(server);
    
    const transport = new StdioServerTransport();
    await server.connect(transport);
  • Input schema for 'show_world_intel': countries (array of strings, default 7 major economies) and min_alert_level (enum Green/Orange/Red, default Orange).
    {
      countries: z
        .array(z.string())
        .default(['US', 'CN', 'JP', 'KR', 'DE', 'IN', 'GB'])
        .describe('ISO 2-letter country codes for macro data'),
      min_alert_level: z
        .enum(['Green', 'Orange', 'Red'])
        .default('Orange')
        .describe('Minimum disaster alert level'),
    },
  • fetchGlobalMacro helper: fetches GDP growth, inflation, and unemployment from World Bank API for given country codes, returns array of CountryMacro objects.
    export const fetchGlobalMacro = async (
      countries: string[] = [...DEFAULT_COUNTRIES],
    ): Promise<CountryMacro[]> => {
      const [gdpPoints, inflPoints, unempPoints] = await Promise.all([
        fetchIndicator(INDICATORS.gdp_growth, countries),
        fetchIndicator(INDICATORS.inflation, countries),
        fetchIndicator(INDICATORS.unemployment, countries),
      ]);
    
      const gdp = latestByCountry(gdpPoints);
      const infl = latestByCountry(inflPoints);
      const unemp = latestByCountry(unempPoints);
    
      const countryNames = new Map<string, string>();
      for (const p of [...gdpPoints, ...inflPoints, ...unempPoints]) {
        countryNames.set(p.countryCode, p.country);
      }
    
      return countries.map((code) => ({
        country: countryNames.get(code) ?? code,
        countryCode: code,
        gdp_growth: gdp.get(code)?.value ?? null,
        gdp_growth_year: gdp.get(code)?.year ?? null,
        inflation: infl.get(code)?.value ?? null,
        inflation_year: infl.get(code)?.year ?? null,
        unemployment: unemp.get(code)?.value ?? null,
        unemployment_year: unemp.get(code)?.year ?? null,
      }));
    };
  • fetchDisasters helper: fetches GDACS RSS feed, parses disaster events, filters by minimum alert level (Green/Orange/Red).
    export const fetchDisasters = async ({
      minAlertLevel = 'Orange',
    }: {
      minAlertLevel?: AlertLevel;
    } = {}): Promise<DisasterEvent[]> => {
      const res = await fetch(RSS_URL);
      if (!res.ok) throw new Error(`GDACS fetch error ${res.status}`);
      const xml = await res.text();
    
      const minRank = ALERT_RANK[minAlertLevel];
      const items = xml.split('<item>').slice(1);
    
      return items
        .map((chunk) => parseItem(chunk.split('</item>')[0]))
        .filter((e): e is DisasterEvent => e !== null)
        .filter((e) => ALERT_RANK[e.alertLevel] >= minRank);
    };
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that no API keys are needed and that it shows 'all currently active alerts, Orange+ by default.' However, it does not explicitly state whether the tool is read-only, mention rate limits, data freshness, or any side effects. The behavior is implied but not fully transparent.

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 two sentences plus an illustrative example. It is front-loaded with the main purpose and key details, with no wasted words. Every sentence adds value.

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

Completeness4/5

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

Despite lacking an output schema, the description adequately outlines the return content (macro metrics and disaster alerts per country). It mentions default countries and alert filtering. However, it does not specify data sources' update frequency or output format, though for a drill-down tool this is sufficient.

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

Parameters4/5

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

Both parameters have schema descriptions (100% coverage). The tool description adds value by explaining the macro data fields (GDP growth, inflation, unemployment) and clarifying the default alert level behavior ('Orange+ by default'). It provides context beyond the schema, such as the list of default countries and what the output includes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Global intelligence drill-down: World Bank macro + GDACS active disasters', listing specific metrics (GDP growth, inflation, unemployment) and alert levels. It distinguishes from siblings like show_macro by combining macro and disaster data, and references a related tool (get_brief) for context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage guidance: 'Use after get_brief when you need more detail on global risks' and gives concrete example queries (e.g., 'which countries are in recession'). It mentions 'No API keys required' but does not explicitly state when not to use it or compare it to alternative 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/evan-moon/firma'

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