Skip to main content
Glama
Supernova Cosmology MCP Server

Supernova Cosmology MCP Server

bin_hubble_diagram

Compress a supernova Hubble diagram into redshift bins of mu residuals against a fiducial cosmology, preserving full covariance for compact correlated data vectors and trend analysis.

Instructions

Compress a Hubble diagram into redshift bins of mu residuals vs a fiducial cosmology.

Use to see trends (e.g. the low-z vs high-z offset that drives Om/w differences between
samples) and to make compact, correlated data vectors. Residuals are mu - mu_fid with the
best-fit offset removed; binning is a full-covariance GLS compression, so the bin
covariance (written as .npy) keeps systematic correlations. Union3 is already binned:
bins with one node are passed through.

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": "bin_hubble_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
zmaxNoUpper z cut.
zminNoz cut (None = release standard).
fid_OmNoFiducial flat-LCDM Om for residuals.
fid_w0NoFiducial w0.
fid_waNoFiducial wa.
n_binsNoNumber of log-spaced z bins.
datasetNoSN sample.pantheonplus
output_dirYesDirectory for the binned CSV + covariance.
calibratorsNoinclude | exclude | only (Pantheon+).exclude

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 well: it defines residuals as mu - mu_fid with the best-fit offset removed, discloses that binning is a full-covariance GLS compression, that the bin covariance is written as .npy and preserves systematic correlations, and that Union3 is passed through. It omits filesystem side effects such as overwrite behavior for existing output files.

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?

Three tight sentences, front-loaded with the core action, then the use case, then the output/edge-case behavior. No filler and no repetition of schema fields.

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?

The tool is moderately complex (9 parameters, file output), and the description covers inputs, compression method, output artifacts, and the Union3 special case; with an output schema present, return values need no further explanation. Minor gaps remain around file overwrite behavior and runtime expectations.

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 every parameter including zmin/zmax, the three fiducial cosmology values, n_bins, dataset, and calibrators is already documented. The description adds context on how fiducial cosmology enters the residuals and that binning is log-spaced GLS, but no parameter-level detail beyond 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?

States a specific verb and resource ('Compress a Hubble diagram into redshift bins of mu residuals vs a fiducial cosmology') and fixes the output semantics (residuals, bin covariance). An agent can distinguish this from plot_hubble_diagram or fit_sn_cosmology without opening the schema.

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?

Gives concrete motivation for when to use it: 'to see trends (e.g. the low-z vs high-z offset that drives Om/w differences)' and 'to make compact, correlated data vectors'. It does not name an alternative sibling or state when not to use it, so the routing guidance is implied rather than exhaustive.

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