Skip to main content
Glama
sktime

sktime-mcp

Official
by sktime

split_data

Split a time series data handle into temporal train and test sets using a test fraction or forecast horizon. Returns separate handles and metadata for further analysis.

Instructions

Split a time series data handle into temporal train and test sets, registering both halves as new data handles. Provide exactly one of test_size (fraction in (0, 1)) or fh (forecast horizon). fh may be an integer (hold out that many final steps) or a list of relative horizon indices (hold out max(fh) final steps). Returns train_handle, test_handle, cutoff timestamp, train_size, and n_test.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fhNoForecast horizon for the test window. Integer: hold out that many final time steps. List of ints: hold out max(fh) final steps (e.g. fh=[1,5,10] reserves 10 steps). Mutually exclusive with test_size.
test_sizeNoFraction of observations to hold out for the test set, exclusive range (0.0, 1.0). Mutually exclusive with fh.
data_handleYesData handle ID to split (from load_data_source or transform_data).
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses that new data handles are registered and returns are listed, but does not specify whether the original handle remains intact, safety profile (destructive or read-only), or error handling for invalid inputs.

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?

The description is a concise three-sentence paragraph with the core action front-loaded. Every sentence adds meaningful information without redundancy or filler.

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?

Despite no output schema, the description lists all return values (train_handle, test_handle, cutoff, train_size, n_test). It covers parameter constraints comprehensively but could mention error handling for invalid combinations or non-time-series data.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. The description adds value by explaining fh can be an integer or list of ints with an example (e.g., fh=[1,5,10] reserves 10 steps), and clarifies mutual exclusivity, exceeding what the schema alone 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?

The description clearly states the tool splits a time series data handle into temporal train and test sets, registering new handles, which is a specific verb and resource. The purpose is unambiguous and distinct from sibling tools like 'transform_data' or 'fit'.

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?

The description explicitly states to provide exactly one of test_size or fh, and explains how fh works (integer or list of ints). This provides clear usage guidance, though it lacks comparison with alternative tools or when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sktime/sktime-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server