Skip to main content
Glama
clusters-mcp-server
by HEP-KE

crossmatch_catalogs

Cross-match two cluster catalogues by sky position and redshift, then output one-to-one matched pairs with separations, dz, and mass ratios for SZ-vs-X-ray or SZ-vs-SZ comparisons.

Instructions

Positionally (+ redshift) cross-match two cluster catalogues; write the matched pairs and mass ratios.

Use for SZ-vs-X-ray (or SZ-vs-SZ) comparisons. Nearest neighbour in A for each B
entry within the radius, made one-to-one (each A keeps its closest B). Typical
radii: 2' for SZ-SZ (ACT/SPT beams ~1'), 3' for Planck (5' beam, larger
positional error) or SZ-vs-eROSITA. Output CSV has *_a / *_b columns,
sep_arcmin, dz and mass_ratio = M500_b / M500_a. Optical catalogues (des_y6_wazp)
carry richness instead of mass (mass_ratio NaN): pass WaZP (optionally richness-cut) as
catalog_a and the SZ catalogue as catalog_b with ~2' radius to get a richness_a-vs-M500_b
table (the KD-tree is built on A, every B entry is queried).

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": {
      "output_dir": "<output_dir>",
      "catalog_a": "<catalog_a>",
      "catalog_b": "<catalog_b>"
    },
    "name": "crossmatch_catalogs"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_dzNoMax |z_a - z_b| / (1 + z_a); None = no redshift requirement (entries without z can still match).
catalog_aYesHarmonised CSV from fetch_cluster_catalog, or a dataset key.
catalog_bYesHarmonised CSV from fetch_cluster_catalog, or a dataset key.
output_dirYesDirectory for the matched CSV.
radius_arcminNoMax angular separation in arcmin.

Output Schema

NameRequiredDescriptionDefault
filesYes
statusYes
messageYes
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.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 well: it discloses the matching algorithm (nearest neighbour in A per B entry, forced one-to-one with each A keeping its closest B), the directional asymmetry of the KD-tree, and the resulting output columns including sep_arcmin, dz and mass_ratio. It does not mention overwrite behavior, output file naming, or permission requirements for writing to output_dir, which keeps it below a 5.

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?

Purpose and output are front-loaded in the first sentence, followed by algorithm and then parameter guidance in a logical order with no filler sentences. Some lines are dense and clause-heavy (the parenthetical about richness and the KD-tree), which slightly hurts scannability.

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 multi-input matching tool, the description covers algorithm, directional behavior, catalogue-role conventions, radius selection and output columns; an output schema exists so return-value detail is not strictly required, yet it still summarizes columns helpfully. Missing only operational details such as file naming and overwrite/collision handling in output_dir.

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 the baseline is 3, but the description adds real meaning beyond the schema: it supplies typical radius_arcmin values tied to instrument beam sizes and explains the semantic roles of catalog_a vs catalog_b (KD-tree built on A; A holds mass, B holds mass for the ratio). The max_dz semantics are left to the schema, so it is not a 5.

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?

States a specific verb and resource: positionally (+ redshift) cross-match two cluster catalogues and write matched pairs plus mass ratios. This is clearly distinct from siblings like compare_mass_calibration or fetch_cluster_catalog, and the output artifact (CSV with pairs and mass ratios) is named up front.

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?

Gives concrete usage contexts (SZ-vs-X-ray, SZ-vs-SZ) and prescriptive radius guidance per survey (2' for ACT/SPT, 3' for Planck/eROSITA). It also explains the optical-catalogue workaround with an explicit A/B assignment. It stops short of stating when NOT to use it or naming a sibling alternative, so it is strong context rather than full routing guidance.

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