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.

Guide tests: a step's purpose must match its tool's own summary

Phoenix Agent (mac-studio)bd3f75262bc4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80857d8..e697414 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -420,6 +420,14 @@ source here, and no proxy is substituted for any of these measures.
years in history-recall; and the central bank, hotspot, airport and
Yahoo maturity counts. The test claim above is narrowed to the counts
the tests pin.
+- The check that a prompt step's purpose agrees with its tool let wrong
+ tools through on one shared parameter word, or on a tool's own
+ disclaimer (internet outages repointed to the cyclone tool passed). A
+ second check now requires a shared word with the tool's name or first
+ sentence, without generic schema words, and three such swaps are pinned
+ as failures. Seven step purposes were reworded to name what their tool
+ returns. Measured on 118 steps and 160 tools, 1,141 of 18,762 one-step
+ swaps still pass both checks.
### 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 1be4e69..fa3d057 100644
--- a/src/world_intel_mcp/guide_prompts.py
+++ b/src/world_intel_mcp/guide_prompts.py
@@ -537,7 +537,7 @@ PROMPTS: tuple[ResearchPrompt, ...] = (
"the daily effective federal funds rate history (needs FRED_API_KEY)",
args=(("series_id", "DFF"),),
),
- ("intel_major_crosses", "how the major currencies sit against each other today"),
+ ("intel_major_crosses", "the major currency cross rates: how they sit against each other today"),
Step(
"intel_history_backfill",
"only if FRED_API_KEY is not set: loads the effective federal "
@@ -709,7 +709,7 @@ PROMPTS: tuple[ResearchPrompt, ...] = (
steps=(
Step(
"intel_earthquakes",
- "the events, newest first and at most 50 by default, so a "
+ "the earthquakes, newest first and at most 50 by default, so a "
"count of 50 means older ones may have been cut off; call again "
"with a higher limit to check",
args=(("min_magnitude", "{min_magnitude}"), ("hours", "{hours}")),
@@ -1056,7 +1056,7 @@ PROMPTS: tuple[ResearchPrompt, ...] = (
question="Which cloud providers report active incidents, and which of their regions are involved?",
steps=(
("intel_service_status", "active incidents at AWS, Azure, GCP, Cloudflare and GitHub"),
- ("intel_cloud_regions", "where the named regions are"),
+ ("intel_cloud_regions", "where the named cloud regions are"),
),
limits=(
"Status pages are published by the providers themselves and can "
@@ -1142,7 +1142,7 @@ PROMPTS: tuple[ResearchPrompt, ...] = (
Step("intel_aoi_brief", "the cited picture inside {name} today", args=(("name", "{name}"),)),
Step(
"intel_aoi_changes",
- "the first call records a baseline for {name}",
+ "the first change detection call records a baseline for {name}",
args=(("name", "{name}"),),
),
),
@@ -1316,7 +1316,7 @@ PROMPTS: tuple[ResearchPrompt, ...] = (
question="Does {query} appear on the US Treasury OFAC SDN list, and under which programs?",
arguments=(PromptArg("query", "Name to search for", required=True),),
steps=(
- Step("intel_sanctions_search", "name matches on the SDN list", args=(("query", "{query}"),)),
+ Step("intel_sanctions_search", "name matches on the SDN sanctions list", args=(("query", "{query}"),)),
Step(
"intel_company_profile",
"only if a match is a listed company: who it is",
@@ -1382,7 +1382,7 @@ PROMPTS: tuple[ResearchPrompt, ...] = (
Step(
"intel_domain_summary",
"the same over ten years: its earliest timestamps show when "
- "storage began for each category",
+ "storage began for each domain",
args=(("hours", 87600),),
),
Step(
@@ -1393,7 +1393,7 @@ PROMPTS: tuple[ResearchPrompt, ...] = (
("intel_timeline", "the stored entries in time order for the matching domain"),
Step(
"intel_similar_events",
- "earlier stored entries that resemble the strongest match",
+ "earlier stored events similar to the strongest match",
args=(("text", Fill("the text of the strongest match from step 3")),),
),
(
diff --git a/src/world_intel_mcp/tests/test_guide.py b/src/world_intel_mcp/tests/test_guide.py
index fdfeda7..752752a 100644
--- a/src/world_intel_mcp/tests/test_guide.py
+++ b/src/world_intel_mcp/tests/test_guide.py
@@ -738,9 +738,10 @@ def test_no_prompt_repeats_a_call() -> None:
# the tool says about itself: it shares a word with the tool's name,
# description or parameter descriptions, and any upper-case name it uses (a
# provider such as AAA or NWS) appears there too, as written or spelled out.
-# A step pointed at a wrong but registered tool fails one or both (review F14
-# M7). Measured 2026-10-17: the check catches 12,006 of the 13,524 ways of
-# pointing one step at another registered tool.
+# It catches many steps pointed at a wrong but registered tool (review F14
+# M7), not all: measured 2026-10-18 on 118 steps and 160 tools, 2,731 of the
+# 18,762 ways of pointing one step at another tool pass it, and 1,141 also
+# pass the summary check further down (review R8).
_COMMON_WORDS = frozenset(
"about after also and any each every for from into its latest most only "
"over recent that the their them then this today were what when where "
@@ -2105,3 +2106,54 @@ def test_prompt_counts_match_their_tables() -> None:
words = {3: "three", 4: "four", 5: "five"}
flat = " ".join(_text("yield-curve-check").split())
assert f"falls back to {words[len(maturities)]} Yahoo maturities ({', '.join(maturities)})" in flat
+
+
+# A stronger purpose check (review R8). One shared word anywhere in a tool's
+# text let wrong tools through: parameter words such as country or days, and
+# a tool's own disclaimer (intel_cyclones says "not an outage"). Here the
+# purpose must share a word with the tool's own summary, its name and the
+# first sentence of its description, leaving out words most tools share.
+_GENERIC_SCHEMA_WORDS = frozenset(
+ "active call country current data days default filter first flag intel "
+ "limit list major name recent region tool".split()
+)
+
+
+def _summary_words(tool: Tool) -> set[str]:
+ summary = guide._first_sentence(" ".join((tool.description or "").split()))
+ return _content_words(f"{tool.name.replace('_', ' ')} {summary}") - _GENERIC_SCHEMA_WORDS
+
+
+def _summary_problem(tool: Tool, purpose: str) -> str | None:
+ if _content_words(purpose) & _summary_words(tool):
+ return None
+ return f"{tool.name}: the purpose shares no word with the tool's name or first sentence"
+
+
+def test_step_purposes_share_a_word_with_their_tools_summary(tools_pkg) -> None:
+ by_name = {t.name: t for t in tools_pkg.ALL_TOOLS}
+ problems = {
+ f"{prompt.name} step {i + 1}": found
+ for prompt in guide_prompts.PROMPTS
+ for i, step in enumerate(prompt.steps)
+ if (found := _summary_problem(by_name[step.tool], step.purpose))
+ }
+ assert problems == {}
+
+
+ ("prompt_name", "index", "wrong_tool"),
+ [
+ ("internet-disruption", 0, "intel_cyclones"),
+ ("internet-disruption", 0, "intel_acled_events"),
+ ("yield-curve-check", 0, "intel_disease_outbreaks"),
+ ],
+)
+def test_summary_check_catches_swaps_the_word_check_let_through(
+ tools_pkg, prompt_name: str, index: int, wrong_tool: str
+) -> None:
+ """Each of these passed the shared-word check; the summary check fails it."""
+ by_name = {t.name: t for t in tools_pkg.ALL_TOOLS}
+ purpose = guide_prompts.get(prompt_name).steps[index].purpose
+ assert _purpose_problems(by_name[wrong_tool], purpose) == []
+ assert _summary_problem(by_name[wrong_tool], purpose) is not None