Skip to main content
Glama
Weak Lensing Surveys MCP Server

Weak Lensing Surveys MCP Server

fetch_wl_chain

Download a published weak-lensing MCMC or nested-sampling chain and write a slim CSV with weight, Omega_m, sigma_8, S_8, and h0/w for comparison before analysis or contour plotting.

Instructions

[Published result - for comparison only] Download a published MCMC/nested-sampling chain and write a slim CSV (published result, for comparison only).

Use before analyze_wl_chain / plot_s8_om_contours. The CSV holds weight, omega_m, sigma_8, S_8 (derived as sigma_8 sqrt(Om/0.3) where the chain lacks it or has NaN) and h0 / w when present. DES chains are 5-50 MB each; KiDS chains come from the release tarball. HSC Y3 chains need HSC-SSP credentials (clear error + manual-download path).

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>",
      "chain": "<chain>",
      "output_dir": "<output_dir>"
    },
    "name": "fetch_wl_chain"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesChain key, see describe_wl_dataset(...)['chains']: des_y3 3x2pt_lcdm, 3x2pt_wcdm, 1x2pt_lcdm, 2x2pt_lcdm, planck_lcdm, ...; des_y6 3x2pt_lcdm, 1x2pt_lcdm, 3x2pt_cmb_lcdm, ... (see fetch_des_y6_chain); kids_* cosebis, bandpowers, xipm.
datasetYesSurvey release key.
max_rowsNoCap on rows written to the CSV (highest-weight rows kept).
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.3/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 so well: it names file sizes (5-50 MB for DES), the source for KiDS (release tarball), the auth requirement for HSC Y3 with the failure mode (clear error + manual-download path), and the exact CSV columns including the derived S_8 formula and NaN handling. It does not state whether re-runs re-download or reuse cached files, which is the main remaining behavioral unknown for a fetch tool.

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?

Well front-loaded: purpose, then downstream ordering, then output contract, then per-survey caveats. The only waste is the doubled 'published result - for comparison only' framing in the first sentence, which repeats the same idea twice before the substance starts.

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?

For a 4-parameter fetch tool with an output schema and no annotations, the description covers purpose, sequencing, output columns, derivation rules, payload sizes, and auth failure handling. Only caching/idempotency and network-failure behavior are left unstated, which are minor for correct selection but relevant for correct invocation.

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 adds meaning beyond it by explaining where valid chain keys come from (describe_wl_dataset and per-survey variants) and by describing the content/semantics of the produced CSV rather than just the arguments. It adds nothing further on max_rows or output_dir, which the schema already documents.

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?

The description gives a specific verb+resource+output: 'Download a published MCMC/nested-sampling chain and write a slim CSV.' It also scopes the tool as a comparison-only published-result fetcher, which separates it from fetch_shear_catalog / fetch_wl_datavector style data tools and from the downstream analyze/plot siblings.

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?

It explicitly states the ordering constraint: 'Use before analyze_wl_chain / plot_s8_om_contours.' The credential exception for HSC Y3 and the alternative path ('manual-download path') are also named. There is no explicit when-not statement and chain-key discovery is only pointed at via the schema's describe_wl_dataset reference, not the description text.

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