Skip to main content
Glama
Malja MCP

Malja MCP

Official

Monitor changes

monitor_changes
Read-only

Detects significant changes in a country’s UNHCR displacement data by comparing the latest year and earlier snapshots, returning alert-ready events plus a baseline for future checks.

Instructions

Check a country's UNHCR displacement figures for changes worth attention: compares the latest year with the previous one (significant jumps, threshold crossings, record highs/lows) and, against an earlier snapshot, detects new data releases and revisions of past years. Returns alert-ready events with stable ids and severities plus a snapshot to compare against next time. Read-only: never contacts anyone; the snapshot is kept in the server cache and/or returned to the caller.

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": "monitor_changes"
  }
}

Input 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.
countryYesCountry name or ISO3 code, e.g. "Egypt", "EGY", "syria"
metricsNoMetrics to watch (default: refugees, asylum_seekers, idps, returned_refugees, returned_idps, stateless, ooc, oip — those with data)
snapshotNoA `snapshot` returned by an earlier call — compare against it (takes precedence over the server-stored one)
min_changeNoIgnore changes smaller than this many people (default 1000)
thresholdsNoAlert when a metric crosses a level between the previous and latest year
history_yearsNoYears of history to load for records and unusual-change scoring (default 10)
store_snapshotNoSave this result as the stored baseline for the next call (default true)
jump_threshold_pctNoYear-over-year change (%) flagged as a significant jump (default 25)
use_stored_snapshotNoCompare against the snapshot stored by the previous call (default true)

Output Schema

NameRequiredDescriptionDefault
roleYes
eventsYes
sourceYes
countryYes
datasetYes
metricsYes
summaryYes
baselineYes
citationYes
snapshotYes
latest_yearYes
country_codeYes
previous_yearYes
snapshot_storedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.8.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / snapshot / additionalProperties
      Removed value: -false
    • changedInput schema / properties / snapshot / properties / latest_year / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / snapshot / properties / values / additionalProperties / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / snapshot / properties / values / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / thresholds / items / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / snapshot / properties / latest_year / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / snapshot / properties / values / additionalProperties / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / snapshot / properties / values / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv0.7.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint. The description adds genuinely non-obvious behavior: the server keeps a snapshot cache and/or returns it to the caller, so state persists between calls, and that it never contacts anyone. That is real value beyond the annotations, though it says nothing about failure modes or event ordering.

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?

Two sentences, front-loaded with the core action and scope before the return-value and read-only details. Density is high but each clause (comparison modes, return shape, read-only guarantee) carries weight.

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 11 parameters, nested objects and an output schema, the description supplies the mental model the schema cannot: two comparison modes, alert-ready events with stable ids, and snapshot persistence. An agent could call it correctly from this plus the schema; only edge behavior (empty results, stale snapshots) is unaddressed.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter, enum and default is already documented inline. The description only gestures at snapshot comparison and thresholds generically; the baseline of 3 applies when the schema carries the parameter burden.

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?

The description states a concrete verb and resource: it checks a country's UNHCR displacement figures for changes, comparing year-over-year movement and earlier snapshots. That is more specific than the title 'Monitor changes'. It stops short of naming any sibling (e.g. trend_analysis or latest_statistics) so an agent still has to infer the boundary.

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?

"Changes worth attention" plus the snapshot-vs-previous-call workflow gives clear context for when to reach for this tool. The snapshot precedence rule is reinforced ('against an earlier snapshot'), but no alternative tool is named and no explicit when-not-to-use condition is stated.

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