Skip to main content
Glama

Compute correlation between two layers

correlate_layers
Read-onlyIdempotent

Spatially join two existing workspace layers and return the Pearson correlation coefficient r, sample size n, two-sided p-value approximation, plus human-readable strength and direction labels. Pure read — no layer is added, no op is committed, no credit charge. Returns numbers only; add_fusion_layer renders the same join as a map layer. Required: map_id, layer_a_id, layer_b_id.

Input Schema

NameRequiredDescriptionDefault
map_idYes
rationaleNoOptional short label (≤300 chars) for the map edit history, e.g. "add wildfire layer". Omit it to send nothing beyond the tool arguments.
layer_a_idYes
layer_b_idYes
value_field_aNo
value_field_bNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / rationale / description
      Previous value: -"Short audit-log label (≤300 chars) stating the user-facing goal this call serves, e.g. \"add wildfire layer for the user's California query\". Required on every call. Stored in the operations log so map edits stay traceable — we never see your chat history."New value: +"Optional short label (≤300 chars) for the map edit history, e.g. \"add wildfire layer\". Omit it to send nothing beyond the tool arguments."
    • changedInput schema / required
      Previous value: -[
      -  "map_id",
      -  "layer_a_id",
      -  "layer_b_id",
      -  "rationale"
      -]New value: +[
      +  "map_id",
      +  "layer_a_id",
      +  "layer_b_id"
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover readOnlyHint, idempotentHint, and destructiveHint=false. The description adds value beyond them by clarifying 'no layer is added, no op is committed, no credit charge' and by disclosing the exact return contents, which matters since there is no output schema.

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?

Front-loaded with the core verb and outputs, then the read-only/alternative context. It is reasonably tight, though restating the required parameters at the end is redundant with the schema and slightly dilutes conciseness.

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 read-only analysis tool with no output schema, the description adequately covers return values, safety profile, and the sibling alternative. The main gap is the unexplained value_field_a/value_field_b parameters, which an agent needs to understand to invoke the tool fully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 17% — only rationale is documented in-schema. The description restates the three required params (map_id, layer_a_id, layer_b_id) which are already in the schema's required list, adding no new meaning, and leaves value_field_a/value_field_b entirely unexplained despite their clear semantic importance to a correlation.

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 (spatially join two workspace layers and compute Pearson correlation), and enumerates the concrete outputs (r, n, p-value, strength/direction labels). It also explicitly differentiates itself from the sibling add_fusion_layer, which performs the same join but renders a map layer.

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?

The 'Returns numbers only; add_fusion_layer renders the same join as a map layer' sentence routes the agent between this numeric tool and the visual sibling, giving clear context for selection. However, there is no explicit when-to-use condition (e.g., data prerequisites, minimum layer size) beyond that alternative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources