Skip to main content
Glama

rank_test

Determines the cointegration rank of a vector time-series specification using a parametric bootstrap sequential exact-LR test, returning a proposed r-hat for validation.

Instructions

C1 — The cointegration rank, by PARAMETRIC BOOTSTRAP (drvec's sequential exact-LR test r -> r + 1, r = 0..M-2): THE ONLY WAY TO A RANK in sima. The bootstrap decides; the asymptotic table (cases 1 and 2 only) is shown as orientation and is never the verdict. Reads the critical values, not the p-value; proposes r-hat and never adopts it.

A JOB (sima.jobs): it runs detached, at most cores - 1 at once, on drvec C when its binary is there (drvec's engine="auto"; the engine is in the result's provenance), cached by content: the same files, spec, B, engine and versions return the stored result at once. It waits up to wait seconds (about 20) and then returns the job id with its progress ("replication k of B, comparison r -> r + 1"); job_status/job_result follow it. Never a partial result as final.

Uses prepare_vec's specification. B: 499 by default, 999 when a 1 % verdict matters; below 199 the result is labelled an exploration. multistart: more starts in every fit. seed: 0 is the C's (987654321); another seed is a MONTE CARLO CHECK of an edge-of-5 % verdict (always on the Python engine), never the default.

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": "rank_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
BNo
nameYes
seedNo
waitNo
multistartNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior5/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 so: it discloses detached job execution, a concurrency cap of cores-1, content-based caching keyed on files/spec/B/engine/versions, a ~20s wait before returning a job id with 'replication k of B' progress, and an explicit promise that a partial result is never returned as final. It even names job_status/job_result as the follow-up path.

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 claim, then behaviors, then parameters. Nearly every sentence carries distinct information, but heavy ALL-CAPS emphasis and chained parentheticals make it denser and noisier than necessary for a five-parameter 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?

For a long-running, cached, job-backed bootstrap with an output schema covering returns and provenance, the description supplies everything an agent needs to call it correctly and to handle the async follow-up. Nothing material is missing.

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

Parameters5/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, and it does for four of five parameters: B's default and thresholds, seed's 0-means-C's-987654321 sentinel and its Monte Carlo semantics, multistart's effect on every fit, and wait's ~20s meaning. Only `name` is left to inference via the 'Uses prepare_vec's specification' line.

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?

States a specific operation on a specific resource: a cointegration rank test via drvec's sequential exact-LR parametric bootstrap for r = 0..M-2. It sharply distinguishes the bootstrap verdict from the asymptotic table, though it never explicitly contrasts itself with named siblings (e.g. plot_rank_bootstrap for the visual, prepare_vec for the spec).

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 clear context for when the bootstrap is mandatory ('THE ONLY WAY TO A RANK'), plus decision rules for B (499 vs 999 for a 1% verdict, <199 = exploration) and for a non-zero seed (a Monte Carlo check of an edge-of-5% verdict, always Python engine). No explicit exclusions or sibling routing, so it stops short of a 5.

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