Skip to main content
Glama
Weak Lensing Surveys MCP Server

Weak Lensing Surveys MCP Server

plot_redshift_distributions

Plot normalized redshift distributions per tomographic bin for selected weak-lensing surveys and export the curves to CSV for inspection or cross-survey comparison.

Instructions

Plot n(z) per tomographic bin (one panel per dataset) and write them to CSV.

Use to inspect or compare redshift distributions across surveys.
Curves are normalised to unit integral; the metadata reports each
bin's mean redshift (sanity: DES Y3 sources ~0.34, 0.52, 0.74, 0.96;
KiDS-1000 ~0.26..0.93; HSC Y3 ~0.44..1.3).

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": {
      "datasets": "<datasets>",
      "output_dir": "<output_dir>"
    },
    "name": "plot_redshift_distributions"
  }
}

Input Schema

NameRequiredDescriptionDefault
sampleNo'lens' exists only for des_y3.source
datasetsYesOne or more dataset keys.
output_dirYesDirectory where output files are written.

Output Schema

NameRequiredDescriptionDefault
filesYes
statusYes
messageYes
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does reasonably well: it discloses the file-writing side effect (CSV output), the normalization convention (unit integral), and what the metadata reports (mean redshift per bin). It omits overwrite behavior and permission requirements.

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 short sentences, front-loaded with the core action and output, followed by usage and validation detail. The parenthetical reference values are dense but earn their place as a correctness check.

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 described, yet the description still explains the metadata's mean-redshift content. What remains unstated is file overwrite/naming behavior and the default 'source' vs 'lens' tradeoff beyond what the schema enum documents.

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 baseline is 3; the description goes beyond it by explaining that each entry in 'datasets' becomes its own panel and by giving expected mean-redshift ranges per survey, which helps an agent sanity-check results rather than just pass keys.

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

Purpose4/5

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

The description names a specific verb and resource: plots n(z) per tomographic bin, one panel per dataset, and writes CSV. That distinguishes it from unrelated siblings such as plot_covariance or plot_shear_correlation, though it never names a close alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use to inspect or compare redshift distributions across surveys' gives the intent, but there is no when-not guidance and no named alternative (e.g. measure_nz_from_catalog) for agents that need measurements rather than plots.

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