Skip to main content
Glama

plot_cmb_spectra

Plot CMB D_ell bandpowers with error bars across Planck, ACT, and SPT datasets, overlay LCDM theory, and add residual panels for cross-experiment comparison.

Instructions

Plot D_ell bandpowers with error bars for one or more experiments + LCDM + residuals.

Use to reproduce the Planck 2018 TT/TE/EE figure (datasets=['planck_pr3']) or the
SPT-3G D1 / ACT DR6 / Planck overlay (Camphuis+25 Fig.1: ['planck_pr3','act_dr6','spt3g_d1'],
log_y=True for TT/EE). Residuals are D_ell - theory with the same errors.

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_cmb_spectra"
  }
}

Input Schema

NameRequiredDescriptionDefault
log_xNoLogarithmic ell axis.
log_yNoLogarithmic D_ell axis (TT/EE high-ell damping tail).
ell_maxNoUpper ell limit for the x axis (0 = auto).
datasetsNoExperiments to overlay.
spectrumNoSpectrum to plot.TT
output_dirYesDirectory for the PNG.
show_theoryNoOverlay best-fit LCDM.
theory_fileNoTheory CSV (compute_lcdm_theory_spectrum); default = bundled Planck 2018 best fit.
residual_panelNoAdd a (data - theory) panel below.

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
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does clarify figure contents and defines residuals semantically ('D_ell - theory with the same errors') and notes the default bundled Planck 2018 best fit, but says nothing about the artifact produced, output file naming, or whether theory must exist before calling.

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?

Front-loaded with the core action, followed by a compact, high-density usage block. The parenthetical example strings are long but each carries concrete configuration value; only the 'Camphuis+25 Fig.1' citation is arguably decorative.

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 return values need not be explained, and all nine parameters are fully documented in the schema. Description adds the compositional semantics of the figure and residual definition. The only gap is operational detail about writing into output_dir (file naming, overwrite behavior).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description goes beyond it by pairing parameter values with intended outcomes (datasets=['planck_pr3','act_dr6','spt3g_d1'] with log_y=True for the damping tail) and tying theory_file to compute_lcdm_theory_spectrum. This is meaningfully more than the schema's field-by-field titles.

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 ('Plot D_ell bandpowers with error bars') and enumerates the full composition of the figure: experiment bandpowers, LCDM overlay, and residuals. This is clearly distinguishable from siblings like plot_lensing_spectrum, plot_triangle, or plot_cmb_map without opening any 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 when-to-use scenarios with exact parameter configurations — reproducing the Planck 2018 TT/TE/EE figure via datasets=['planck_pr3'], or the Camphuis+25 Fig.1 overlay with three datasets and log_y=True for TT/EE. It stops short of naming alternatives or exclusions (e.g. for lensing use plot_lensing_spectrum), so not a 5.

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