Skip to main content
Glama
Weak Lensing Surveys MCP Server

Weak Lensing Surveys MCP Server

fetch_wl_datavector

Download a published two-point statistic data vector from a weak-lensing survey and write a tidy CSV with covariance for plotting or signal-to-noise analysis.

Instructions

Download one published 2pt statistic and write a tidy CSV.

Use this first for any data-vector question. Columns: bin1, bin2
(tomographic bin pair, 1-based; for gammat bin1=lens, bin2=source),
angbin, x (theta in arcmin, COSEBI mode n, or ell - see x_name),
value, error (sqrt of the covariance diagonal). Also writes the
statistic's covariance sub-matrix as .npy for plot_covariance /
compute_signal_to_noise. Data vectors are the published ones (scale
cuts NOT applied: DES/KiDS files are the full measured vectors; the HSC real-space
file is the CosmoSIS-library one, wider than the Li+23 analysis cuts).
KiDS downloads a 50-130 MB release tarball on first use. des_y6 returns
a not-yet-public notice (available=False, no files) until DES releases
the Y6 2pt products.

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": {
      "dataset": "<dataset>",
      "statistic": "<statistic>",
      "output_dir": "<output_dir>"
    },
    "name": "fetch_wl_datavector"
  }
}

Input Schema

NameRequiredDescriptionDefault
datasetYesSurvey release key (see list_wl_datasets).
statisticYesStatistic: xip, xim (all); gammat, wtheta (des_y3); cosebis, bandpowers (kids_*; plus cosebis_b, bandpowers_b for kids_legacy); cl_ee (hsc_y3).
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

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: it discloses that scale cuts are NOT applied and explains exactly how DES/KiDS versus HSC files differ, warns that KiDS pulls a 50-130 MB tarball on first use, and states that des_y6 returns available=False with no files. It also specifies the error column is the sqrt of the covariance diagonal.

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-loads the action, then column semantics, then side effects and caveats in a logical order. It is dense and long-ish, but each clause carries operational value; the parenthetical asides are the only mild clutter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a download tool with an output schema present, this covers everything an agent needs: what is written, column meanings, the extra .npy artifact, scale-cut caveats per survey, the large-download warning, and the known-empty dataset case.

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 dataset and statistic are already documented in the schema, including the per-dataset statistic enumeration; the description adds little parameter-level meaning beyond that. Its richer detail (bin semantics, x encoding) describes output columns rather than the three input parameters, so baseline 3 is appropriate.

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+resource: "Download one published 2pt statistic and write a tidy CSV." It is immediately distinguishable from siblings like fetch_wl_chain or measure_shear_correlation, and names the exact artifacts produced (CSV plus covariance .npy).

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 this first for any data-vector question" gives a clear routing rule, and the description names downstream consumers (plot_covariance, compute_signal_to_noise) for the covariance output. It stops short of an explicit when-not/alternative rule, and the only exclusion is the dataset-specific des_y6 notice rather than a tool-level alternative.

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