Skip to main content
Glama
Galaxy Cluster Catalogs MCP Server

Galaxy Cluster Catalogs MCP Server

compute_cluster_counts

Computes per-catalogue cluster-count histograms N(z) and cumulative N(>M500), saving CSV and PNG outputs to compare survey depths or support LCDM predictions.

Instructions

Histogram cluster counts: N(z) per redshift bin and cumulative N(>M500), per catalogue.

Use to compare survey depths or as the observed side of predict_cluster_counts_lcdm.
Writes counts_nz.csv and counts_nm.csv (+ a PNG with both panels).

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>",
      "catalogs": "<catalogs>"
    },
    "name": "compute_cluster_counts"
  }
}

Input Schema

NameRequiredDescriptionDefault
m_gridNoM500 thresholds [1e14 Msun] for N(>M) (default log 0.5..30).
z_edgesNoRedshift bin edges (default 0..1.6 step 0.1).
catalogsYesHarmonised CSVs from fetch_cluster_catalog and/or dataset keys (full catalogue).
m500_minNoMass threshold for N(z) in 1e14 Msun (None = all with z).
output_dirYesDirectory for output files (created if missing).
normalise_by_areaNoAlso give counts per deg^2 using each dataset's area.

Output Schema

NameRequiredDescriptionDefault
filesYes
statusYes
messageYes
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.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 by disclosing the side effects: it writes counts_nz.csv, counts_nm.csv and a two-panel PNG. It does not say whether existing files in output_dir are overwritten or how expensive the computation is, which would matter for a file-writing tool.

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?

Three short sentences, front-loaded with what is computed, then usage, then outputs — every line carries distinct information with no repetition.

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 six-parameter tool with an output schema present, the description covers purpose, usage, and written artifacts adequately, and return-value detail is rightly omitted. The only gap is mutation behaviour on existing output files, which an agent calling this repeatedly would want to know.

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 every parameter (m_grid, z_edges, m500_min, normalise_by_area, catalogs, output_dir) is already documented in the schema. The description reinforces the semantics of the N(z) and N(>M500) outputs and the 'per catalogue' grouping, but adds no new parameter-level detail, making the baseline 3 correct.

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 computation ('Histogram cluster counts: N(z) per redshift bin and cumulative N(>M500), per catalogue'), naming both axes of the histogram and the per-catalogue grouping. It is clearly distinguishable from siblings like plot_counts_vs_prediction or predict_cluster_counts_lcdm, which it explicitly names as the counterpart.

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 compare survey depths or as the observed side of predict_cluster_counts_lcdm' gives concrete when-to-use contexts and points at the relevant alternative tool. It stops short of stating what NOT to use it for (e.g. when plot_counts_vs_prediction is preferable), so it falls just short of a 5.

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