Skip to main content
Glama
Malja MCP

Malja MCP

Official

Forecast (naive, with prediction intervals)

forecast
Read-only

Project displacement metrics 1–5 years ahead with OLS prediction intervals, detect structural breaks, and optionally return charts; results are statistical extrapolations, not UNHCR planning figures.

Instructions

Naive linear projection of a displacement metric 1–5 years ahead, based on the last 10 years, with 80% and 95% OLS prediction intervals. Structural breaks in the history are detected and reported; since_break=true fits only the data after the latest break. Optional chart (svg / chartjs / vega-lite) with the interval band. This is a statistical extrapolation, NOT a UNHCR planning figure — always present it with that caveat.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "country": "<country>"
    },
    "name": "forecast"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNo"asylum" = people hosted IN the country; "origin" = people displaced FROM the country
chartNoAlso return a chart of observed + projected values with the interval band
localeNoLanguage of the human-readable text output: "en" (default) or "ar" (Modern Standard Arabic, right-to-left). Structured JSON fields, ISO3 codes and dataset ids stay in English either way.
metricNoMetric to project (default refugees)
countryYesCountry name or ISO3 code, e.g. "Egypt", "EGY", "syria"
since_breakNoFit only the years since the latest detected structural break (needs ≥3 years after it). Default false.
years_aheadNoHorizon (default 3)

Output Schema

NameRequiredDescriptionDefault
chartNo
caveatYes
fit_toYes
methodYes
metricYes
countryYes
fit_fromYes
intervalsYes
projectedYes
historicalYes
changepointsYes
country_codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / chart / properties / spec / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
  2. First observedv0.7.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say readOnly/openWorld; the description adds the estimation basis (last 10 years), interval levels, structural-break detection and reporting, the minimum-data condition for since_break, and an explicit epistemic caveat. That is exactly the behavioral context an agent needs to interpret and present the output responsibly.

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?

Three dense sentences, front-loaded with what the tool computes, then the break handling, then the caveat. No filler and nothing redundant with the schema.

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

Completeness5/5

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

An output schema exists, so return values need no explanation; the description covers method, data window, break behavior, optional charting and the mandatory caveat. Nothing material is missing for correct invocation and interpretation.

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?

Schema coverage is 100%, so the baseline is 3; the description still adds value by explaining the 1–5-year horizon, the 10-year fitting window, and what since_break actually does to the fit. It does not clarify metric options or chart payload differences beyond what the schema already states.

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?

States a specific verb and resource ('naive linear projection of a displacement metric 1–5 years ahead') plus the method (OLS, last 10 years, 80%/95% intervals). It does not name or contrast with the sibling 'trend_analysis', so an agent still has to infer which one to pick when both could apply.

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?

Gives clear operative guidance: since_break=true fits only post-break data (needs ≥3 years), and the result must always be presented with the 'not a UNHCR planning figure' caveat. It stops short of explicit exclusions or pointing to trend_analysis as the descriptive alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.