Skip to main content
Glama
Weak Lensing Surveys MCP Server

Weak Lensing Surveys MCP Server

plot_shear_correlation

Plot upper-triangle xi_+ and lower-triangle xi_- shear correlations by tomographic bin pair, with diagonal-covariance error bars, to visualize weak-lensing data vectors after fetching them.

Instructions

Triangle-of-bin-pairs plot of xi_+ (upper) and xi_- (lower), as in Amon+22 Fig. 1 / Asgari+21.

Use after fetch_wl_datavector. Each panel is one tomographic bin pair
(i,j); points carry the diagonal-covariance error bars. Works for any
statistic CSV (COSEBIs, band powers, C_ell) - then only the upper
triangle is drawn and x is log-scaled when it spans > 1 decade.

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": {
      "xip_csv": "<xip_csv>",
      "output_dir": "<output_dir>"
    },
    "name": "plot_shear_correlation"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNoTitle / legend label.
xim_csvNoOptional xim CSV; drawn in the lower triangle like the DES/KiDS papers.
xip_csvYesCSV from fetch_wl_datavector(statistic='xip').
output_dirYesDirectory where output files are written.
scale_thetaNoPlot theta * xi * 1e4 (paper convention) instead of xi.

Output Schema

NameRequiredDescriptionDefault
filesYes
statusYes
messageYes
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description carries the full disclosure burden. It does add real behavioral detail: points carry diagonal-covariance error bars, only the upper triangle is drawn for generic statistics, and x is log-scaled past one decade. It says nothing about failure modes (missing xim, mismatched bins) or whether existing outputs are overwritten.

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?

Three compact sentences, front-loaded with what is drawn before the procedural caveats. The mid-sentence dash construction for the generic-CSV case is slightly dense but every clause carries information.

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 no explanation, and all five parameters are documented in the schema. The description supplies the visualization layout, error-bar semantics and scaling behavior needed to call it correctly; only error handling and overwrite semantics are absent.

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 the schema already documents label, xim_csv, xip_csv, output_dir and scale_theta. The description only reinforces xim_csv's lower-triangle role and xip_csv's provenance; it adds no syntax or format meaning beyond the schema. Baseline 3 applies.

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?

Names a specific output (a triangle-of-bin-pairs plot of xi_+ upper / xi_- lower) and anchors it to reference papers (Amon+22, Asgari+21), so the agent knows exactly what artifact is produced. It does not explicitly distinguish itself from near neighbors such as plot_covariance, so it stops short of a 5.

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 after fetch_wl_datavector" gives a clear pipeline precondition, which is genuinely useful ordering guidance. It also states the tool generalizes to any statistic CSV (COSEBIs, band powers, C_ell), but gives no explicit when-not or pointer to sibling plotting alternatives.

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