Skip to main content
Glama
Weak Lensing Surveys MCP Server

Weak Lensing Surveys MCP Server

analyze_wl_chain

Extracts marginal S8, Omega_m, and sigma8 constraints from published weak-lensing chains, reporting means, quantiles, and HPD intervals for survey comparison.

Instructions

[Published result - for comparison only] Marginal S8, Omega_m, sigma8 (h, w) of a PUBLISHED chain (published result, for comparison only).

Use to quote a survey's parameter constraints. Reports mean +/- std, median with 16/84% quantiles, 95% intervals, and the marginal mode with 68% HPD (KiDS papers quote MAP/mode + PJ-HPD; DES quotes mean +/- std). Heavy: downloads tens of MB; with set_dispatch it runs the chains.kernels.chain_marginals kernel on the facility instead. Sanity: des_y3 3x2pt_lcdm S8 = 0.776 +/- 0.017.

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": "analyze_wl_chain"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesChain key (as fetch_wl_chain).
datasetYesSurvey release key.
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.9/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 a heavy multi-tens-of-MB download, the dispatch alternative, the exact statistics reported (mean +/- std, median with 16/84% quantiles, 95% intervals, marginal mode with 68% HPD) and the differing conventions KiDS vs DES use. It does not say what happens to existing files in output_dir or how errors surface, but the operational profile is far above average.

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?

It is front-loaded with the purpose and formatted in short lines, and the sanity-check anchor (des_y3 S8 = 0.776 +/- 0.017) is genuinely useful. The phrase 'published result, for comparison only' appears twice in the opening line, which is minor waste.

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 the return format need not be restated, yet the description still explains the statistics delivered and warns about cost and dispatch. For a three-parameter computation with full schema coverage this is close to complete, with only error behavior and file overwrite semantics unaddressed.

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% and the three parameters are already documented there, including the dataset enum. The description adds no syntax, format, or constraint detail for chain, dataset, or output_dir beyond what the schema states, so 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?

The description gives a specific verb and resource: it computes marginal S8, Omega_m, sigma8 (plus h, w) from a PUBLISHED chain, and flags the scope as 'for comparison only', which separates it from the fetch/measure siblings. It stops short of naming the concrete alternatives (compare_s8_with_published, plot_s8_om_contours) that an agent might otherwise pick.

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 quote a survey's parameter constraints' gives an explicit use case, and the mention that with set_dispatch the chains.kernels.chain_marginals kernel runs on the facility points to a concrete alternative path. It never states when to prefer one route over the other, so the choice is left partly implicit.

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