Skip to main content
Glama
marsaplatform

Malja MCP

Official

Trend analysis

trend_analysis
Read-only

Analyze a country's displacement metric over time, including yearly changes, linear trends, CAGR, anomalies, and changepoints.

Instructions

Analyse how a displacement metric evolved for a country: yearly series, year-over-year changes, linear trend (slope, R²), CAGR, statistically anomalous years (z-scores of yearly changes) and changepoints (structural breaks in level/slope, exact penalised segmentation). Default: refugees hosted, last 10 years — widen year_from for better changepoint power.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleNo"asylum" = people hosted IN the country; "origin" = people displaced FROM the country
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: refugees, asylum_seekers, idps, stateless... (default refugees)
countryYesCountry name or ISO3 code, e.g. "Egypt", "EGY", "syria"
year_toNoLast year of the range (default: latest available)
year_fromNoFirst year of the range (default: 10 years back)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYes
trendYes
metricYes
seriesYes
sourceYes
countryYes
segmentsYes
anomaliesYes
changepointsYes
country_codeYes
year_over_yearYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, covering the safety profile. Beyond those, the description adds a genuine methodological caveat — that changepoint power depends on extending year_from — but the rest of the sentence just enumerates returned statistics, which duplicates the output schema, and nothing is said about cost or data coverage limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence, front-loaded with the core action followed by the output enumeration and the one actionable tip. Every clause carries information, though the long list of statistics partially duplicates what the output schema already declares.

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?

With a 100%-covered schema and an existing output schema, the description need not explain return values, yet it still sketches them for orientation and adds the changepoint-window caveat. Nothing essential for invoking the tool correctly appears to be missing.

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 description coverage is 100%, so the baseline is 3. The description goes further by linking the year_from parameter to the analytical quality of changepoint detection, a relationship the schema does not express, and by restating the metric/role defaults in prose context.

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?

States a specific verb and resource ('Analyse how a displacement metric evolved for a country') and enumerates the exact analytical outputs: yearly series, YoY changes, linear trend with slope/R², CAGR, z-score anomalies, and changepoints. This is clearly distinct from siblings like forecast (prediction) or monitor_changes (short-term deltas).

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

Usage Guidelines3/5

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

The description gives default operating behaviour ('Default: refugees hosted, last 10 years') and one conditional tip ('widen year_from for better changepoint power'), which implies when the tool is appropriate. However it never names an alternative sibling (forecast, compare_countries, monitor_changes) or states when NOT to use this tool, so routing guidance is left to inference.

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