Skip to main content
Glama

Stat Intraclass Correlation

stat_intraclass_correlation

Calculate intraclass correlation to assess inter-rater, test-retest, or device agreement and consistency; use ICC2 for absolute agreement and ICC3 for consistency.

Instructions

Intraclass correlation — agreement or consistency between raters or measurements.

WHEN TO USE: inter-rater reliability, test-retest reliability, agreement between measurement devices.

WHEN NOT TO USE: as a substitute for Bland-Altman when the question is whether two methods agree in absolute terms — ICC is bounded by the range of the sample and can look excellent while agreement is poor.

Choosing the form matters and is often got wrong:

  • ICC2 — absolute agreement, raters treated as random and interchangeable.

  • ICC3 — consistency only (do raters rank the same way?), raters fixed.

  • the "k" variants — reliability of the mean of k raters, which is higher.

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": {
      "name": "<name>",
      "targets": "<targets>",
      "raters": "<raters>",
      "ratings": "<ratings>"
    },
    "name": "stat_intraclass_correlation"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
ratersYes
ratingsYes
targetsYes
icc_typeNoICC2

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden; it does add real interpretive behavior, warning that ICC is bounded by sample range and can look excellent while absolute agreement is poor, and explaining that k-variants yield higher reliability for the mean of k raters. It stops short of disclosing data-format expectations, missing-value handling, or assumptions, which matter for a computation tool with no annotation coverage.

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-loads the definition, then uses labeled WHEN TO USE / WHEN NOT TO USE blocks and a short bulleted form-selection guide — well organized and skimmable. A few lines ('Choosing the form matters and is often got wrong') are emphasis rather than content, but nothing is seriously wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the usage framing is strong. However, with four required, fully undocumented column parameters, the description leaves an agent unable to determine the expected data layout (wide vs long) or how missing data is treated — a meaningful gap for a 5-parameter statistical tool.

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 0% across 5 parameters, and the description only gives meaning to icc_type (ICC2 = absolute agreement/random raters, ICC3 = consistency/fixed raters, k-variants = reliability of the mean). The four required parameters (name, targets, raters, ratings) get no explanation, and critically there is no statement of whether the data must be in wide or long format, which determines how those columns are supplied.

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 statistical resource and what it measures ('agreement or consistency between raters or measurements'), and explicitly separates it from the Bland-Altman approach, which is the nearest sibling (stat_plot_blandaltman). An agent can identify the operation and its scope without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit WHEN TO USE list (inter-rater reliability, test-retest, device agreement) and a WHEN NOT TO USE case naming the alternative and the reason (absolute agreement questions belong to Bland-Altman). This is exactly the when/when-not/alternative structure the dimension rewards.

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