Skip to main content
Glama
Weak Lensing Surveys MCP Server

Weak Lensing Surveys MCP Server

plot_shear_catalog

Create QA plots and summary diagnostics for a fetched shear catalogue to verify ellipticity/weight histograms, z_B, sky footprint, c-terms, sigma_e, n_eff, and per-bin counts.

Instructions

QA plots of a shear catalogue: e1/e2 and weight histograms, z_B, and the sky footprint.

Use right after fetch_shear_catalog to check what was downloaded.
Reports weighted mean e1/e2 (the additive c-terms, ~1e-4..1e-3 for
KiDS), the per-component weighted ellipticity dispersion sigma_e
(~0.27 for KiDS-1000, Giblin+21), the effective number density
n_eff = (sum w)^2 / sum w^2 / area (Heymans+12; ~6-7 arcmin^-2 for
the KiDS-1000 gold sample) and per-bin counts.

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": {
      "catalog_fits": "<catalog_fits>",
      "output_dir": "<output_dir>"
    },
    "name": "plot_shear_catalog"
  }
}

Input Schema

NameRequiredDescriptionDefault
output_dirYesDirectory where output files are written.
catalog_fitsYesSlim FITS from fetch_shear_catalog.

Output Schema

NameRequiredDescriptionDefault
filesYes
statusYes
messageYes
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.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 discloses that the tool produces plots and reports weighted mean c-terms, ellipticity dispersion, effective number density, and per-bin counts, complete with reference values for KiDS. It does not explicitly state side effects such as writing files or overwriting existing output, though the output_dir parameter implies file creation.

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?

The description is front-loaded: purpose first, then usage, then detailed metrics. It is efficient overall, but the third sentence is dense, packing several formulas and reference values into a single long clause, which slightly reduces readability. No irrelevant filler is present.

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?

Given a 2-parameter tool with full schema coverage, no annotations, and an output schema, the description is complete enough to select and invoke it correctly. It explains the purpose, when to use it, what plots and statistics it produces, and even gives expected value ranges for KiDS, so an agent has all needed context.

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 coverage is 100%, so both parameters (catalog_fits and output_dir) are fully documented in the input schema. The description adds no parameter-specific semantics beyond what the schema already says; it reinforces that catalog_fits is a slim FITS from fetch_shear_catalog but does not explain output_dir further. 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?

The description states a specific verb+resource: 'QA plots of a shear catalogue', and enumerates exactly what is plotted (e1/e2 histograms, weight histograms, z_B, sky footprint) and what is reported (weighted mean, dispersion, n_eff, per-bin counts). It also distinguishes itself from the fetch_shear_catalog sibling by saying to use it right after that tool.

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 gives clear when-to-use guidance: 'Use right after fetch_shear_catalog to check what was downloaded.' That establishes the prerequisite and intent. However, it does not explicitly state when not to use it or name an alternative plotting tool (e.g., plot_shear_correlation), so it falls just short of the fullest guidance.

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