Skip to main content
Glama

Describe a metric change

did_it_change
Read-onlyIdempotent

Detect departures in one chronological numeric metric by comparing readings to its past with a rank-based monitor; returns state, direction, change points, and effect size for change-review queues.

Instructions

Scan one chronological numeric metric for departures from its own preceding observations, using a descriptive rank-based Shiryaev-Roberts monitor. Use this for a change-review queue. It does not adjust for a measurement denominator, check source freshness or compare several series. The first eight readings warm up the reference; comparison starts at reading nine. An alarm resets the reference and starts warmup again. Returns state (warming_up, steady, watch, changed), monitoring_statistic, direction, zero-based change_points and effect (delta in input units, robust_z, percentile from 0 to 100). The evidence field is a compatibility alias, not a calibrated e-value or p-value; never present it as a valid e-value for false-discovery control. No alarm does not establish stability. Example: {"values":[10,11,9,10,12,10,9,11,20]}.

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": {
      "values": "<values>"
    },
    "name": "did_it_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYesOne to 2048 finite readings in chronological order, oldest first, with consistent units and cadence. The last entry is the current reading; no dates or missing values are inferred.
half_lifeNoOptional positive half-life measured in prior observations, not seconds. A reading this many positions older receives half the rank weight. Omit for equal weights; weighting remains descriptive, not calibrated.
two_sidedNoDefault true monitors upward and downward departures, with watch/changed thresholds 200/1000. False monitors upward only, with thresholds 100/500; thresholds are descriptive.

Output Schema

NameRequiredDescriptionDefault
nNoNumber of supplied observations.
errorNoValidation or computation failure message; inspect MCP isError or the HTTP status.
stateNoCurrent descriptive monitor state.
effectNoLatest reading compared with the current post-reset reference.
methodNoMonitor construction and one-sided/two-sided mode.
readingNoInterpretation, including remaining warmup requirements.
evidenceNoCompatibility alias of monitoring_statistic; not an e-value.
validityNoDescriptive assessment, not a probability or statistical certificate.
watch_atNoDescriptive watch threshold.
weightedNoWhether half-life weighting was requested.
directionNoDirection driving the positive monitor statistic. Null means unavailable or not applicable, never zero.
guaranteeNoNo statistical or market-performance guarantee is made.
changed_atNoDescriptive alarm threshold.
is_e_valueNoThe statistic is not a calibrated e-value.
assumptionsNoOrdered statements or identifiers.
change_pointsNoHistorical alarm indices.
interpretationNoLimits on interpreting a threshold crossing.
statistic_typeNoMonitor family.
monitoring_statisticNoDescriptive Shiryaev-Roberts statistic.
effect_reference_sizeNoPreceding observations in the current reference.
readings_since_changeNoObservations after the most recent alarm. Null means unavailable or not applicable, never zero.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.3
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "assumptions": {},
      +      "change_points": {},
      +      "changed_at": {},
      +      "direction": {},
      +      "effect": {},
      +      "effect_reference_size": {},
      +      "evidence": {},
      +      "guarantee": {},
      +      "interpretation": {},
      +      "is_e_value": {},
      +      "method": {},
      +      "monitoring_statistic": {},
      +      "n": {},
      +      "reading": {},
      +      "readings_since_change": {},
      +      "state": {},
      +      "statistic_type": {},
      +      "validity": {},
      +      "watch_at": {},
      +      "weighted": {}
      +    },
      +    "required": [
      +      "n",
      +      "state",
      +      "evidence",
      +      "monitoring_statistic",
      +      "statistic_type",
      +      "is_e_value",
      +      "validity",
      +      "weighted",
      +      "assumptions",
      +      "direction",
      +      "effect",
      +      "effect_reference_size",
      +      "change_points",
      +      "watch_at",
      +      "changed_at",
      +      "readings_since_change",
      +      "reading",
      +      "guarantee",
      +      "interpretation",
      +      "method"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Existing tool-error payload; no successful result fields are implied.",
      +    "properties": {
      +      "error": {
      +        "description": "Validation or computation failure message; inspect MCP isError or the HTTP status.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedOutput schema / description
      Previous value: -"Tool-specific result object described in each tool's description. Check status/ok/state, reading, validity and limits before using numbers. MCP returns this object in structuredContent and JSON text; invalid input returns isError=true with an error field. No tool fetches sources or executes trades."New value: +"MCP change result; full per-reading states and evidence_series are deliberately omitted by this tool. Tool errors retain the separate error-message shape."
    • addedOutput schema / properties
      Added value: +{
      +  "assumptions": {
      +    "description": "Ordered statements or identifiers.",
      +    "items": {
      +      "description": "One retained statement or identifier.",
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "change_points": {
      +    "description": "Historical alarm indices.",
      +    "items": {
      +      "description": "Zero-based observation index.",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "type": "array"
      +  },
      +  "changed_at": {
      +    "description": "Descriptive alarm threshold.",
      +    "type": "number"
      +  },
      +  "direction": {
      +    "anyOf": [
      +      {
      +        "description": "Direction driving the positive monitor statistic.",
      +        "enum": [
      +          "up",
      +          "down"
      +        ],
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "description": "Direction driving the positive monitor statistic. Null means unavailable or not applicable, never zero."
      +  },
      +  "effect": {
      +    "additionalProperties": false,
      +    "description": "Latest reading compared with the current post-reset reference.",
      +    "properties": {
      +      "delta": {
      +        "anyOf": [
      +          {
      +            "description": "Latest reading minus reference median, in input units.",
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Latest reading minus reference median, in input units. Null means unavailable or not applicable, never zero."
      +      },
      +      "direction": {
      +        "description": "Direction relative to the preceding reference median.",
      +        "enum": [
      +          "up",
      +          "down",
      +          "flat"
      +        ],
      +        "type": "string"
      +      },
      +      "percentile": {
      +        "anyOf": [
      +          {
      +            "description": "Percentage of reference readings strictly below the current value.",
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Percentage of reference readings strictly below the current value. Null means unavailable or not applicable, never zero."
      +      },
      +      "robust_z": {
      +        "anyOf": [
      +          {
      +            "description": "Departure divided by 1.4826 times reference MAD; unavailable at zero spread.",
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Departure divided by 1.4826 times reference MAD; unavailable at zero spread. Null means unavailable or not applicable, never zero."
      +      }
      +    },
      +    "required": [
      +      "direction",
      +      "delta",
      +      "robust_z",
      +      "percentile"
      +    ],
      +    "type": "object"
      +  },
      +  "effect_reference_size": {
      +    "description": "Preceding observations in the current reference.",
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "error": {
      +    "description": "Validation or computation failure message; inspect MCP isError or the HTTP status.",
      +    "type": "string"
      +  },
      +  "evidence": {
      +    "description": "Compatibility alias of monitoring_statistic; not an e-value.",
      +    "type": "number"
      +  },
      +  "guarantee": {
      +    "description": "No statistical or market-performance guarantee is made.",
      +    "type": "null"
      +  },
      +  "interpretation": {
      +    "description": "Limits on interpreting a threshold crossing.",
      +    "type": "string"
      +  },
      +  "is_e_value": {
      +    "const": false,
      +    "description": "The statistic is not a calibrated e-value.",
      +    "type": "boolean"
      +  },
      +  "method": {
      +    "description": "Monitor construction and one-sided/two-sided mode.",
      +    "type": "string"
      +  },
      +  "monitoring_statistic": {
      +    "description": "Descriptive Shiryaev-Roberts statistic.",
      +    "type": "number"
      +  },
      +  "n": {
      +    "description": "Number of supplied observations.",
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "reading": {
      +    "description": "Interpretation, including remaining warmup requirements.",
      +    "type": "string"
      +  },
      +  "readings_since_change": {
      +    "anyOf": [
      +      {
      +        "description": "Observations after the most recent alarm.",
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "description": "Observations after the most recent alarm. Null means unavailable or not applicable, never zero."
      +  },
      +  "state": {
      +    "description": "Current descriptive monitor state.",
      +    "enum": [
      +      "warming_up",
      +      "steady",
      +      "watch",
      +      "changed"
      +    ],
      +    "type": "string"
      +  },
      +  "statistic_type": {
      +    "const": "shiryaev_roberts",
      +    "description": "Monitor family.",
      +    "type": "string"
      +  },
      +  "validity": {
      +    "const": "descriptive",
      +    "description": "Descriptive assessment, not a probability or statistical certificate.",
      +    "type": "string"
      +  },
      +  "watch_at": {
      +    "description": "Descriptive watch threshold.",
      +    "type": "number"
      +  },
      +  "weighted": {
      +    "description": "Whether half-life weighting was requested.",
      +    "type": "boolean"
      +  }
      +}
  2. Changed5 schema fields changedv0.4.3-glama.1
    • addedInput schema / properties / half_life / description
      Added value: +"Optional positive half-life measured in prior observations, not seconds. A reading this many positions older receives half the rank weight. Omit for equal weights; weighting remains descriptive, not calibrated."
    • addedInput schema / properties / two_sided / default
      Added value: +true
    • addedInput schema / properties / two_sided / description
      Added value: +"Default true monitors upward and downward departures, with watch/changed thresholds 200/1000. False monitors upward only, with thresholds 100/500; thresholds are descriptive."
    • addedInput schema / properties / values / description
      Added value: +"One to 2048 finite readings in chronological order, oldest first, with consistent units and cadence. The last entry is the current reading; no dates or missing values are inferred."
    • addedOutput schema / description
      Added value: +"Tool-specific result object described in each tool's description. Check status/ok/state, reading, validity and limits before using numbers. MCP returns this object in structuredContent and JSON text; invalid input returns isError=true with an error field. No tool fetches sources or executes trades."
  3. Changed7 schema fields changedv0.4.1
    • removedInput schema / properties / half_life / description
      Removed value: -"optional: readings after which old history counts half, for drifting metrics"
    • addedInput schema / properties / half_life / exclusiveMinimum
      Added value: +0
    • removedInput schema / properties / two_sided / description
      Removed value: -"detect drops as well as rises (default true)"
    • removedInput schema / properties / values / description
      Removed value: -"the metric's history, oldest first"
    • addedInput schema / properties / values / maxItems
      Added value: +2048
    • addedInput schema / properties / values / minItems
      Added value: +1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observedv0.1.2

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (which only assert readOnly/idempotent/non-destructive): eight-reading warmup before comparison starts, reset-on-alarm semantics, threshold values per mode, and the exact returned fields. It also pre-empts a dangerous misreading by warning that the evidence field is a compatibility alias, not a calibrated e-value, and that no alarm does not establish stability.

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?

Purpose is front-loaded, followed by exclusions, mechanics, return shape, and caveats in a logical order with no filler sentences. The trailing example array is compact and directly useful; every clause carries information an agent needs to invoke or interpret the tool.

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

Completeness5/5

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

Covers the full lifecycle of a call: input expectations, warmup and reset behavior, output fields, and interpretive caveats. Even though an output schema exists, the prose adds the semantic caveats an agent cannot get from field types alone.

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 values, half_life, and two_sided are already fully documented in the schema. The description adds behavioral context around warmup and thresholds but no parameter meaning beyond what the schema states, so the baseline applies.

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 concrete verb and resource ("scan one chronological numeric metric for departures") and names the underlying method ("rank-based Shiryaev-Roberts monitor"). It also draws the boundary against related analyses by explicitly denying denominator adjustment, freshness checking, and multi-series comparison, so an agent can tell what this tool is and is not.

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 a clear usage context ("Use this for a change-review queue") plus an explicit when-not list: it does not normalize by a measurement denominator, check source freshness, or compare series. No sibling tool is named as an alternative, which is the only thing separating this from a top score.

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