Skip to content

160-tool MCP server for real-time global intelligence from free public APIs: markets, liquidity, prediction markets, SEC filings, conflict, military, aircraft-cohort early warning, migration and border flows, cyber, climate, news and more. Dated observation history, 29 research prompts, cited briefs, geofences, SSE dashboard. MIT, no paid API keys.

conflict-trend: a UCDP count of 0 can be a release that ends early

Phoenix Agent (mac-studio)f20e9dff9961
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 66d1f4c..d58288e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -404,6 +404,12 @@ source here, and no proxy is substituted for any of these measures.
fetch fails, so the diff reports everything departing with no gap. Both
AOI prompts now say so, call a whole domain departing at once
unconfirmed, and point to `failing_sources`. The code is unchanged.
+- conflict-trend told the model to check the latest UCDP `date_start`
+ before reading a thin window as calm, but when the pinned release
+ (gedevents/25.1) ends before the window the tool returns count 0 with
+ no date and no marker. The limit now names the release and says a
+ count of 0, or a newest event well before the window ends, is missing
+ data, not zero events. The code is unchanged.
### Added: tropical cyclone forecast tracks
- `intel_cyclones` and `intel_jtwc_cyclones` take `include_forecast`
diff --git a/src/world_intel_mcp/guide_prompts.py b/src/world_intel_mcp/guide_prompts.py
index 2633201..1be4e69 100644
--- a/src/world_intel_mcp/guide_prompts.py
+++ b/src/world_intel_mcp/guide_prompts.py
@@ -399,9 +399,13 @@ PROMPTS: tuple[ResearchPrompt, ...] = (
limits=(
"Event datasets are revised and arrive late, so the most recent "
"days are the least complete. A quiet final week is not proof of calm.",
- "UCDP is read from one pinned GED release, and a release only "
- "holds events up to its own cutoff. Check the latest date_start "
- "UCDP returned before reading a thin recent window as calm.",
+ "UCDP is read from one pinned GED release (gedevents/25.1), which "
+ "holds events only up to its own cutoff. The tool states neither "
+ "that cutoff nor a marker when your window lies after it: it "
+ "drops the older events and returns count 0. Check the latest "
+ "date_start UCDP returned; when count is 0, or the newest event "
+ "is well before the window ends, UCDP has no data for that span, "
+ "which is missing data, not zero events.",
"Count events and fatalities separately: fewer events with more "
"deaths is not de-escalation.",
"ACLED and UCDP define an event differently. Compare each source "
diff --git a/src/world_intel_mcp/tests/test_guide.py b/src/world_intel_mcp/tests/test_guide.py
index 389e4d2..203ede7 100644
--- a/src/world_intel_mcp/tests/test_guide.py
+++ b/src/world_intel_mcp/tests/test_guide.py
@@ -1984,3 +1984,27 @@ async def test_aoi_prompts_say_which_domains_fail_silently(monkeypatch, tmp_path
assert "A domain that fails is listed in data_gaps" not in text
assert "earthquakes, and wildfires when NASA_FIRMS_API_KEY" in text.replace("Earthquakes", "earthquakes")
assert "failing_sources in intel://guide/source-health" in text
+
+
+async def test_conflict_trend_says_a_ucdp_release_can_end_before_the_window(monkeypatch) -> None:
+ """With the token set and the API answering, a release whose newest
+ event predates the window gives count 0 with no marker and no date."""
+ from world_intel_mcp.sources import conflict
+
+ class _OldRelease(_DownFetcher):
+ async def get_json(self, *args, **kwargs):
+ return {
+ "TotalPages": 1,
+ "Result": [{"id": 1, "date_start": "2024-12-31", "best": 3, "type_of_violence": 1}],
+ }
+
+ monkeypatch.setenv("UCDP_ACCESS_TOKEN", "test-only")
+ result = await conflict.fetch_ucdp_events(_OldRelease(), days=60)
+ assert result["count"] == 0
+ assert not {"error", "degraded", "reason", "data_gaps"} & set(result)
+ assert "date_start" not in json.dumps(result)
+ assert conflict._UCDP_GED_URL.endswith("/gedevents/25.1")
+ text = " ".join(_text("conflict-trend").split())
+ assert "one pinned GED release (gedevents/25.1)" in text
+ assert "when count is 0, or the newest event is well before the window ends, UCDP has no data" in text