cosmotron_mcp.reviewer_tools¶
build_review_evidence ¶
Pre-compute all deterministic artefact checks for the Reviewer.
Returns a text EVIDENCE block containing
- Per-artefact inspection (cls bandpower count, ell range, Cl sign/finiteness, map nside, SACC data-vector length and covariance shape)
- Knox covariance cross-check verdict per bin
- Deterministic output-validation gate (validate_outputs)
- Plots present in plots/ vs required_plots
The Reviewer calls this FIRST, then emits REVIEW: PASS/FAIL based solely on the numbers in this block — it never calls tools itself.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_dir
|
str
|
Session directory to build evidence for. |
required |
required_plots
|
list[str] | None
|
Plot names expected to exist; defaults to the
session's |
None
|
Returns:
| Type | Description |
|---|---|
str
|
The formatted EVIDENCE text block. |
Source code in cosmotron_mcp/server.py
list_session_plots ¶
List a session's result plots + what each SHOULD show.
For each plots/*.png: {name, path, kind, expectation}. Used by the
advisory @plot_reviewer (vision) agent — it reads each PNG and checks it
against expectation. Deterministic: only enumerates + tags by filename; the
visual judgement lives in the agent. NOT a PASS/FAIL gate.
NOTE — sanctioned exception to the repo-relative-paths convention: path
is ABSOLUTE, because the consumer loads the PNG directly (an image-read
call needs a real filesystem path, not one relative to an unknown cwd).
Do not persist this path into plan.json or a dispatch message — pass it
straight to the image-reading step and discard it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_dir
|
str
|
Session directory to list plots for. |
required |
Returns:
| Type | Description |
|---|---|
list[dict]
|
A list of |