Skip to main content
Glama
Supernova Cosmology MCP Server

Supernova Cosmology MCP Server

plot_sn_contours

Plot 68%/95% credible contours for a chosen supernova cosmology parameter pair from fit CSV files, with optional sample overlays and LCDM markers.

Instructions

Plot 68%/95% credible contours (HPD of the gridded marginal posterior) for one parameter pair.

Use after fit_sn_cosmology (wcdm: Om-w; w0wacdm: w0-wa or Om-w0) to reproduce the
familiar SN contour figures (Brout+22 Fig. 9, DES 2024 Fig. 4, Rubin+23 Fig. 9);
pass several CSVs to overlay samples.

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": {
      "output_dir": "<output_dir>",
      "contour_csvs": "<contour_csvs>"
    },
    "name": "plot_sn_contours"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelsNoLegend labels (default: file stems).
show_lcdmNoMark w = -1 / (w0, wa) = (-1, 0).
output_dirYesDirectory for the PNG.
contour_csvsYes2D contour CSVs from fit_sn_cosmology (`*_2d_<a>_<b>.csv`), all for the same parameter pair.

Output Schema

NameRequiredDescriptionDefault
filesYes
statusYes
messageYes
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the statistical method (HPD of gridded marginal posterior), the contour levels, the upstream producer of the inputs, and that multiple CSVs are superimposed on one figure. It does not say what happens on mismatched input pairs, missing output_dir, or how labels default when lengths conflict.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and statistic, followed by the prerequisite and figure precedents. No filler or restatement of the tool name.

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?

For a plotting tool with an output schema and full parameter coverage, the description supplies the essential context: what is drawn, how it is computed, what must precede it, and how to combine inputs. Only minor operational details (output file naming, directory preconditions, error behavior) are absent.

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 coverage is 100%, so contour_csvs, labels, show_lcdm and output_dir are already documented in the schema, including the max-6 and same-pair constraint. The description adds only the concept that multiple CSVs overlay onto the same axes, which is useful but incremental over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and artifact: plot 68%/95% credible contours (HPD of the gridded marginal posterior) for one parameter pair. This clearly separates it from plot_hubble_diagram and plot_sn_covariance, which produce different figures.

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?

Explicitly states ordering ('Use after fit_sn_cosmology') and maps model choices to parameter pairs (wcdm: Om-w; w0wacdm: w0-wa or Om-w0), plus notes that several CSVs overlay samples. It gives no when-not guidance, e.g. what to do if CSVs come from different parameter pairs.

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