Skip to main content
Glama
Weak Lensing Surveys MCP Server

Weak Lensing Surveys MCP Server

plot_covariance

Plot the correlation matrix from a covariance file to inspect off-diagonal structure, such as strong positive correlations between neighbouring angular bins in cosmic shear data.

Instructions

Plot the correlation matrix r_ij = C_ij / sqrt(C_ii C_jj) of a data vector.

Use to inspect off-diagonal structure (strong positive correlation
between neighbouring angular bins and across bin pairs at large theta
is expected for cosmic shear).

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": {
      "cov_npy": "<cov_npy>",
      "output_dir": "<output_dir>"
    },
    "name": "plot_covariance"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoPlot title.
cov_npyYesCovariance .npy from fetch_wl_datavector.
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.8/5.0
Behavior3/5

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

With no annotations, the description must carry behavior, and it does disclose the core transformation (covariance to normalized correlation) and the expected physical signature. It does not say what artifact is written into output_dir, how the tool behaves on a non-positive-definite or mismatched input, or whether it is purely a write-to-disk visualization; the presence of an output schema covers return values but not these runtime traits.

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?

Two short sentences, front-loaded with the operation and its defining formula, followed by the intended inspection use case. Nothing is redundant, and the parenthetical adds genuine interpretive value.

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 three-parameter plotting tool with full schema coverage and an output schema, the description covers what it computes and why to run it. The only material gap is the on-disk output behavior associated with output_dir, which is not described.

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 cov_npy, output_dir, and title are already documented. The description reinforces that the input is a covariance matrix being converted, but adds no new syntax, format, or constraint details beyond the schema.

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 gives a specific verb (plot) and a precisely defined derived resource, including the normalization formula r_ij = C_ij / sqrt(C_ii C_jj). It is clear the tool converts a covariance into a correlation matrix and visualizes it, though it does not explicitly name a sibling tool it is distinct from.

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 to inspect off-diagonal structure" states a concrete when-to-use case and adds what patterns are expected for cosmic shear, helping an agent interpret the plot. It offers no when-not conditions or named alternatives (e.g. plain covariance plotting versus the shear-correlation tools), so it stops short of full routing guidance.

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