C48_S2SW gfs_waveinit Orion MCP Tool Effectiveness Report - TerrenceMcGuinness-NOAA/global-workflow GitHub Wiki
Date: April 27, 2026
Companion page: C48_S2SW-gfs_waveinit-Orion-srun-layout-Error-Analysis
Source log: emcbot gist 19778eedaaf41e80a46a0f3e7aceec5f (gfs_waveinit.log, 1430 lines)
MCP server: global-workflow-unified-mcp v3.6.2 (eib-mcp-gateway, 52 tools, 8 modules)
The root cause analysis was driven primarily by direct evidence in the failure log itself (shell trace + Slurm srun error message). MCP tools played a supporting role:
- High value: the three health/status tools โ they cleanly verified the gateway, ChromaDB, and Neo4j were online before any analysis began, eliminating "is the platform working?" as a variable.
-
Low value (for this case): the two RAG tools โ
search_documentationandsearch_issuesreturned no prior occurrence of this exact srun layout error. That is itself a useful negative result (it confirmed no known fix exists in the KB), but the tools did not contribute new evidence to the diagnosis.
Net assessment: Of 5 MCP tools used, 3 were strongly effective (health/inventory), 1 was weakly effective (negative result with low confidence), and 1 was effectively unused (no hits). The diagnosis would have reached the same conclusion without the RAG queries; it could not have been confidently grounded without the health checks.
| # | Tool | Module | Purpose in this task | Result | Rating | Why useful / not useful |
|---|---|---|---|---|---|---|
| 1 |
mcp_health_check (detailed=true) |
Utility | Confirm gateway + ChromaDB + Neo4j are healthy before trusting any other answer | 8/8 components healthy; 85,995 docs, 5,174 graph nodes, ChromaDB heartbeat OK | โ โ โ โ โ | Foundational. Without this, any "no results" answer below would be ambiguous (is the tool broken or is the data missing?). Empirical validation, not just a status flag. |
| 2 | get_server_info |
Utility | Inventory: which tools/modules are available for the analysis | Listed 52 tools across 8 modules incl. find_env_dependencies, trace_execution_path, search_issues
|
โ โ โ โ โ | Useful for tool selection โ let me pick search_issues and search_documentation deliberately rather than guessing tool names. Slightly redundant with the instructions file but confirms the live state. |
| 3 | get_knowledge_base_status |
Semantic Search | Confirm collection coverage (do we even have anything Orion/wave-specific to search?) | 6 collections; code-with-context-v8-0-0 60,576 docs, global-workflow-docs-v8-0-0 22,498 docs, plus jjobs-v8-0-0 700, community-summaries 2,113. Neo4j: 314 shell scripts, 89 J-Jobs, 2,724 env vars, 7,499 DEPENDS_ON_ENV edges |
โ โ โ โ โ | Set realistic expectations: code/docs collections are large and should yield hits if the topic is covered; the absence of hits in step 4โ5 therefore carries signal. |
| 4 |
search_documentation (multi-collection hybrid) |
Semantic Search | Find prior documentation of srun ... bind_type:threads,mask_cpu,one_thread / Unable to layout tasks on given cpus on Orion in wave init MPMD |
8 results, top similarity 54.5% (Rocoto <nodes> tag, UFS FAQ on CMEPS task counts, container build instructions) โ none topical |
โ โ โโโ | Negative result. Top score 54.5% is below typical relevance threshold (~70%); the matches were generic Slurm/Rocoto resource-tag documentation, not Orion-specific srun affinity errors. Useful as confirmation that no prior fix is documented, but did not contribute to the diagnosis. The query string was very symptom-specific; a broader query (Orion task affinity wave grid) might have surfaced more, but the symptom-specific query was the right epistemic choice. |
| 5 |
search_issues (GitHub) |
GitHub Integration | Look for a prior global-workflow issue/PR matching this Orion wave-init MPMD failure |
"No issues found" | โ โโโโ | Zero hits. Likely a query-formulation issue (the string was long and joined many keywords with implicit AND). The tool itself is fine, but for this case it produced no actionable signal. Action item: retry with shorter, OR-combined keyword queries (Orion srun layout, wave init mpmd, mod_def ep_10m) before concluding no prior issue exists. |
Rating scale: โ โ โ โ โ critical to the conclusion ยท โ โ โ โ โ valuable supporting evidence ยท โ โ โ โโ partially useful ยท โ โ โโโ marginal ยท โ โโโโ effectively unused.
Listed for completeness โ these are good candidates for follow-up if the case recurs:
| Tool | Module | Why it would have helped |
|---|---|---|
find_env_dependencies |
Code Analysis (Neo4j) | Would have traced wavempexec, OMP_NUM_THREADS, max_tasks_per_node, and USE_CFP across JGLOBAL_WAVE_INIT โ exgfs_wave_init.sh โ run_mpmd.sh to confirm the affinity-related variables and where they're set per platform. Strong fit for the --hint=nomultithread analysis. |
trace_execution_path |
Code Analysis (Neo4j) | Would have produced a clean call chain (JGLOBAL_WAVE_INIT โ exgfs_wave_init.sh โ run_mpmd.sh โ chunk_mpmd โ srun) instead of relying on hand-reading the shell trace. |
find_callers_callees |
Code Analysis (Neo4j) | Could identify every other workflow script that sources unset_strict.sh immediately before an srun โ i.e., enumerate every place where the same "swallowed exit code" bug pattern exists. |
analyze_code_structure |
Code Analysis (Neo4j) | Could pull the precise body of run_mpmd.sh lines 220โ245 (the strict-mode toggle around srun) to back the patch recommendation with a verbatim reference. |
get_job_details / list_job_scripts
|
Operational | Would categorize JGLOBAL_WAVE_INIT in the j-job inventory (1 of 89) and surface its sibling wave scripts. |
explain_workflow_component |
Operational | Graph-enriched explanation of the wave init component โ useful for the "what should normally happen" framing. |
These were skipped because the shell trace in the gist already provided unambiguous evidence (+ run_mpmd.sh[222] srun ... with the failure message immediately following). Using the graph tools would have produced a more rigorous artifact (verbatim line refs, full call chain) but would not have changed the conclusion.
What worked well
- Front-loading health/status calls (tools 1โ3) before any RAG query established platform trust and KB scope. This is a reusable pattern.
- Treating the 54.5%-similarity top result from
search_documentationas a negative result rather than padding the answer with low-relevance content. - Providing the verbatim Slurm error string to the RAG queries โ even though they didn't return hits, future ingestion of this very wiki page will make the same query succeed next time.
What could be improved
-
search_issuesquery was over-specified (one long AND-joined string). For tools backed by full-text search, batching shorter OR-style queries usually outperforms one long query. - Should have used
find_env_dependenciesandtrace_execution_pathto back therun_mpmd.shexit-code-swallowing finding with verbatim graph references. Recommendation only โ the conclusion holds either way. - No use of
record_sdd_step/start_sdd_session. Per project convention, ad-hoc analyses don't require an SDD session, but if this becomes a tracked fix, a session would be appropriate.
This wiki page (and its companion analysis) will improve future MCP performance on this exact failure mode:
- Once
global-workflow.wikiis re-ingested,search_documentationqueries onsrun Unable to layout tasks Orion wave initwill return the analysis with high similarity. - Future runs of
search_issues/search_documentationfor the misleadingNo model definition file for grid ep_10msymptom will surface the upstream srun root cause โ closing the loop on the diagnostic gap observed here.
Recommendation: trigger a re-ingestion of the global-workflow.wiki collection after this commit so the analysis is queryable next time the failure recurs.
| Tool | Used? | Rating | Net contribution |
|---|---|---|---|
mcp_health_check |
โ | โ โ โ โ โ | Established trust in all downstream answers |
get_server_info |
โ | โ โ โ โ โ | Tool-selection inventory |
get_knowledge_base_status |
โ | โ โ โ โ โ | Calibrated expectations on RAG hit-likelihood |
search_documentation |
โ | โ โ โโโ | Useful negative result; no diagnostic content |
search_issues |
โ | โ โโโโ | Zero hits; query likely over-specified |
find_env_dependencies |
โ | (would be โ โ โ โ โ) | Skipped; would have strengthened the bug-pattern claim |
trace_execution_path |
โ | (would be โ โ โ โ โ) | Skipped; would have produced a verbatim call chain |
analyze_code_structure |
โ | (would be โ โ โ โโ) | Skipped; nice-to-have for line-precise patch refs |
Bottom line: the MCP gateway provided strong infrastructural validation (health/inventory/status) but the two semantic-retrieval tools did not return diagnostic content for this case. The diagnosis was carried by direct log evidence; MCP's value here was scaffolding and negative confirmation that no prior known fix exists. The companion analysis page is itself a corrective contribution to the KB.