Skip to main content
Glama

Describe a metric change

did_it_change
Read-onlyIdempotent

Scan a chronological numeric metric for departures from its own history using a rank-based Shiryaev-Roberts monitor; returns change state, direction, change points, and effect size.

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; choose real_or_sampling when a measurement denominator may explain the movement, market_assessment when source/freshness gates matter, or spectral_assessment for a multi-series correlation panel. 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 use it to assert valid_evalues in which_metrics_matter. No alarm does not establish stability. Example: {"values":[10,11,9,10,12,10,9,11,20]}.

Input Schema

TableJSON 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

TableJSON 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.2/5.0
Behavior3/5

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

Annotations already declare this as read-only, idempotent, non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond that: an eight-reading warmup, alarm-triggered reference reset, the caveat that the evidence field is a compatibility alias rather than 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose and the routing guidance before the mechanics and return values. Dense but each sentence carries load; only the enumerated output-field dump and the JSON example feel slightly padded.

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?

Complete given the complexity: routing, warmup semantics, state values, output fields, a caveat about the evidence alias, and a runnable example. Even though an output schema exists, the prose explains semantics an agent needs to interpret the result correctly.

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 the schema already documents values, half_life, and two_sided thresholds, matching the baseline of 3. The description restates the warmup/threshold behavior in prose but adds no parameter syntax or format detail beyond what the schema already provides.

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?

Names a specific verb+resource (scan a chronological numeric metric for departures) and distinguishes itself from siblings by naming real_or_sampling, market_assessment, and spectral_assessment with the conditions that select each. An agent can route between tools without opening a 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?

Explicitly states when to use this tool (change-review queue) and, critically, when to use each alternative instead. It also adds a negative usage rule: do not use the evidence field to assert valid_evalues in which_metrics_matter.

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