Skip to main content
Glama
Supernova Cosmology MCP Server

Supernova Cosmology MCP Server

plot_hubble_diagram

Generates publication-style Hubble diagrams of distance modulus versus redshift for Type Ia supernova samples, with fiducial curves, residual panels, and covariance-binned residuals.

Instructions

Publication-style Hubble diagram: mu(z) with the fiducial curve and a residual panel.

Use to show a sample (cf. Brout+22 Fig. 4, DES 2024 Fig. 1): per-SN points with
diagonal errors (grey), full-covariance binned residuals (colour), the fiducial
model and Pantheon+ calibrators highlighted. Residuals have the best-fit offset removed
(M/H0 are degenerate), so only the SHAPE of mu(z) is meaningful.

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>"
    },
    "name": "plot_hubble_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
zmaxNoUpper z cut.
zminNoz cut (None = release standard).
fid_OmNoFiducial flat-LCDM Om (curve + residual reference).
fid_w0NoFiducial w0.
fid_waNoFiducial wa.
n_binsNoBinned residuals overlaid (0 = none).
datasetNoSN sample.pantheonplus
output_dirYesDirectory for the PNG.
calibratorsNoinclude | exclude | only (Pantheon+).include

Output Schema

NameRequiredDescriptionDefault
filesYes
statusYes
messageYes
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 key behavioral traits: residuals have the best-fit offset removed because M/H0 are degenerate, so only the shape of mu(z) is meaningful. It also specifies visual encoding (grey diagonal errors, coloured full-covariance binned residuals). It stops short of describing output file naming or side effects, but goes well beyond a restatement of the parameters.

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

Conciseness4/5

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

Two tight sentences, front-loaded with the identity of the plot before the usage and caveat. The parenthetical citations and colour notes earn their place, though the density of the second sentence is slightly heavy.

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?

An output schema exists so the description need not explain return values, and the PNG destination is covered by output_dir. For a nine-parameter rendering tool the description supplies the important interpretive caveat (shape-only residuals) and the visual contract, leaving only minor gaps such as figure sizing or file naming.

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 description coverage is 100%, so the schema already documents all nine parameters including enum meanings for dataset and calibrators. The description adds thematic context (fiducial curve and residual reference, which dataset elements get highlighted) but no per-parameter format or edge-case detail beyond the schema, so the baseline 3 applies.

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?

States a specific verb and resource ('Publication-style Hubble diagram: mu(z) with the fiducial curve and a residual panel') and enumerates exactly what the rendered figure contains: per-SN points with diagonal errors, binned residuals, fiducial model, and highlighted calibrators. This is clearly distinguishable from siblings like bin_hubble_diagram, plot_sn_contours, and compute_distance_modulus.

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?

'Use to show a sample (cf. Brout+22 Fig. 4, DES 2024 Fig. 1)' gives a concrete usage context and a publication-figure intent. It does not explicitly say when to prefer this over bin_hubble_diagram or plot_sn_contours, so there are no true exclusions, but the when-to-use signal is clear.

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