Skip to main content
Glama

canonical_analysis

Orders combinations of transformed time-series levels from least to most predictable, revealing stable relations versus common growth to guide joint VARMA identification after differencing.

Instructions

N1b — Box and Tiao's (1977) canonical analysis of the transformed LEVELS (each series' Box-Cox and seasonal differences; NOT its regular ones): the combinations of the series ordered from least to most predictable. Nearly white ones are relations among the series that stay stable over time; nearly non-stationary ones (sqrt(lam) >= near, the scale of a root: for an AR(1) component lam = phi^2) their common growth. When two or more series are differenced and fewer components look non-stationary, the joint model may not need every difference — the question of cointegration, which N1c asks (prepare_vec) and C1 answers (rank_test, by parametric bootstrap on drvec); this reading is not a test, and sima never changes a d on its own. p is the VAR order (0: the last significant M(l) of Tiao and Box's stepwise table on the levels). Run it after the gate, before the identification, when two or more series are differenced; with raw data (load_data, characterize), right after characterize, on the characterization's levels.

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

Input Schema

NameRequiredDescriptionDefault
pNo
nameYes
nearNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/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 disclose important behavioral points: it is a reading not a test, and sima never changes a d on its own. It also explains the near threshold and the interpretation of near-white vs. near-non-stationary components. It does not fully spell out side effects or operational requirements, but it goes well beyond what the schema alone conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

There is no obvious filler, and the method is front-loaded. But the text is a dense block with nested parentheticals, tool-name asides, and econometric shorthand, which makes it harder to scan than necessary for an agent.

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 complex econometric tool with no annotations and three parameters, the description covers the method, when it belongs in the pipeline, its relation to cointegration testing, the p and near semantics, and the no-automatic-d-change caveat. The output schema handles return values, so the main remaining gap is the unexplained required name parameter.

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 0%, so the description must compensate. It does explain p (VAR order, with 0 meaning the last significant M(l) in Tiao and Box's stepwise table) and near (sqrt(lam) >= near, with the AR(1) example lam = phi^2). However, the required name parameter is never explained, leaving a critical identifier undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the exact method (Box and Tiao's 1977 canonical analysis) and the object it operates on (transformed levels, not regular differences), so an expert can identify the operation. It also distinguishes this reading from cointegration testing by naming prepare_vec and rank_test. The jargon-heavy phrasing keeps it from being fully self-evident to a non-specialist agent.

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?

It gives explicit sequencing: run after the gate and before identification when two or more series are differenced, or right after characterize on raw-data levels. It also names the sibling tools that answer the related cointegration question (prepare_vec, rank_test) and states that this tool itself is not a test.

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