sktime-mcp
v0.1.3MCP (Model Context Protocol) layer for sktime - Registry-Driven for LLMs
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
query_registry
Discover sktime estimators, metrics, or capability tags. Common tags you can filter estimators by: 'capability:pred_int' (bool) - prediction intervals, 'capability:multivariate' (bool) - multivariate support, 'capability:missing_values' (bool) - NaN handling, 'requires-fh-in-fit' (bool) - needs forecast horizon at fit time. Set task='tag' (or 'tags') to query the full list of capability tags.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum results (default: 50). Ignored if task='tag'. |
offset | integer | Skip this many results for pagination (default: 0). Ignored if task='tag'. |
query | string | Search by name or description (substring, case-insensitive). Can be combined with task and tags filters. |
tags | object | Filter by capability tags, e.g. {'capability:pred_int': true}. Ignored if task='tag'. |
task | string | Filter by scitype: forecaster, classifier, regressor, transformer, clusterer, detector, splitter, metric, param_est, aligner, network. Set to 'tag' or 'tags' to retrieve capability tags. |
describe_component
Describe a registered sktime component (estimator, splitter, metric or transformer) by name or a loaded qualified alias. Client input is never evaluated or used to import modules.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the component class (e.g., 'ARIMA', 'SlidingWindowSplitter', 'MeanAbsolutePercentageError') |
instantiate
Create an estimator or pipeline instance using a sktime craft specification. The spec is a string that evaluates to an estimator, e.g., 'ARIMA(order=(1, 1, 1))' or 'Detrender() * ARIMA()'.
| Parameter | Type | Description |
|---|---|---|
spec * | string | Craft specification string. |
list_handles
List all active estimator handles in memory
release_handle
Release an estimator handle and free it from memory
| Parameter | Type | Description |
|---|---|---|
handle * | string | Handle ID to release |
fit
Fit an estimator on data. Provide explicit X_handle and/or y_handle (or datasets) depending on the estimator's scitype; each handle/dataset pair (y_handle vs y_dataset, X_handle vs X_dataset) is mutually exclusive. A data handle loaded with exog_columns carries X alongside its target: fit(y_handle=h) uses that X automatically (reported under 'exogenous').
| Parameter | Type | Description |
|---|---|---|
estimator_handle * | string | Handle from instantiate |
X_dataset | string | Optional: Demo dataset name for X data; it must ship exogenous data (a target-only dataset such as 'airline' is refused). Mutually exclusive with X_handle. |
X_handle | string | Optional: data handle whose exogenous columns (exog_columns) are used as X. Errors if the handle has no exogenous columns. Do not pass the same handle as y_handle. Mutually exclusive with X_dataset. |
fh | integer | array | Optional: Forecast horizon (e.g. 12 or [1,2,3]) to pass to fit |
run_async | boolean | If True, runs the fit asynchronously in the background and returns a job_id. |
y_dataset | string | Optional: Demo dataset name for y data. Mutually exclusive with y_handle. |
y_handle | string | Optional: data handle whose target series is y. Mutually exclusive with y_dataset. If it carries exogenous columns and X_handle/X_dataset are omitted, they are used as X. |
predict
Generate predictions from a fitted estimator. Supports different modes like predict, predict_interval, predict_quantiles. The full result is also registered as a data handle, returned as `prediction_handle`: pass it to plot_series (with the train/test handles), save_data, or call_method on a metric (y_pred_data_handle) to score it against a test split. A forecaster fitted with exogenous data needs FUTURE X covering the horizon: pass X_handle (e.g. the test half from split_data) or X_dataset.
| Parameter | Type | Description |
|---|---|---|
estimator_handle * | string | Handle of a fitted estimator |
X_dataset | string | Optional: Demo dataset name for X data; it must ship exogenous data (a target-only dataset such as 'airline' is refused). Mutually exclusive with X_handle. |
X_handle | string | Optional: data handle whose exogenous columns are the future X for the horizon (required if the forecaster was fitted with X). Errors if the handle has none. Mutually exclusive with X_dataset. |
alpha | number | array | Alpha values for quantiles (float or list of floats) |
coverage | number | array | Coverage level for intervals (float or list of floats) |
horizon | integer | Forecast horizon (default: 12). Capped by the server's SKTIME_MCP_MAX_HORIZON (default 10000); larger requests are rejected. |
mode | string | Prediction mode |
run_async | boolean | If true, runs prediction as a background job and returns a job_id. |
y_dataset | string | Optional: Demo dataset name for y data. Mutually exclusive with y_handle. |
y_handle | string | Optional: data handle whose target series is y: the series a detector annotates or a transformer transforms (as in fit). Forecasters ignore it. Mutually exclusive with y_dataset. |
update
Update a fitted estimator with new data. If y_handle carries exogenous columns and X_handle/X_dataset are omitted, they are used as X automatically.
| Parameter | Type | Description |
|---|---|---|
estimator_handle * | string | Handle of a fitted estimator |
X_dataset | string | Optional: Demo dataset for X data; it must ship exogenous data. Mutually exclusive with X_handle. |
X_handle | string | Optional: data handle whose exogenous columns are used as X. Errors if the handle has none. Mutually exclusive with X_dataset. |
y_dataset | string | Optional: Demo dataset for y data. Mutually exclusive with y_handle. |
y_handle | string | Optional: data handle whose target series is the new y. Mutually exclusive with y_dataset. |
get_fitted_params
Get fitted parameters from an estimator
| Parameter | Type | Description |
|---|---|---|
estimator_handle * | string | Handle of a fitted estimator |
call_method
Dynamically call any native method on an instantiated sktime component (e.g. 'split', 'get_alignment', '__call__'). Use this tool to interact with non-standard scitypes like Splitters, Metrics, or Aligners that do not support the generic 'fit' or 'predict' endpoints. Pass 'kwargs' as a dictionary of arguments.
| Parameter | Type | Description |
|---|---|---|
handle_id * | string | Memory handle ID of the instantiated component |
method_name * | string | Name of the method to call (e.g. 'split') |
kwargs | object | Dictionary of keyword arguments to pass to the method. Pass '_dataset' or '_data_handle' as suffixes in keys to inject memory data (e.g., {'y_dataset': 'airline'}). |
evaluate
Cross-validate a forecaster with expanding-window CV. Each fold scores fh steps (default 1), with cutoffs advanced by step_length. Without initial_window, exactly cv_folds folds end at the final observation. Horizon caps and fold geometry are checked before jobs or arrays are created. Dataset and data handle inputs are supported for y and X. Exogenous columns attached to the y handle are used automatically when X is omitted; passing the same handle as y and X is refused.
| Parameter | Type | Description |
|---|---|---|
estimator_handle * | string | Handle from instantiate |
y * | string | Target time series: data_handle id or demo dataset name (e.g. 'airline'). |
X | string | Optional: exogenous time series: a data_handle id (its exogenous columns are used; errors if it has none) or a demo dataset name that ships exogenous data (a target-only dataset such as 'airline' is r… |
cv_folds | integer | Number of cross-validation folds (default: 3). The series must have at least max(fh) + (cv_folds - 1) * step_length + 1 observations. Ignored if initial_window is set. |
fh | integer | array | Forecast horizon scored in each fold, relative to the fold cutoff. Integer n: steps 1..n (e.g. 12 = a 12-step-ahead evaluation). List of ints: exactly those steps (e.g. [1, 6, 12]). Default 1. Maximum… |
initial_window | integer | Optional: initial training window size for expanding-window CV. When set, folds run from this window to the end of the series (cv_folds is ignored); must be <= len(y) - max(fh). |
metric | string | Optional: performance metric name (e.g. 'MeanAbsolutePercentageError'). |
run_async | boolean | If true, runs evaluation as a background job and returns a job_id. |
step_length | integer | Number of time steps the fold cutoff advances between folds (default 1). Larger values mean fewer refits. |
list_available_data
List all data available for use — system demo datasets and active user-loaded data handles — in a single unified response. Use is_demo=true for demos only, is_demo=false for handles only, or omit is_demo to get both.
| Parameter | Type | Description |
|---|---|---|
is_demo | boolean | Optional filter: true = only system demos, false = only active data handles, omit = both. |
load_data_source
Load data from various sources into a data handle for forecasting. Can run synchronously (blocking) or asynchronously in the background. Supported source types: 'pandas' - from a dict or inline data (keys: data, time_column, target_column). 'file' - from CSV, Excel (.xlsx), or Parquet (keys: path, time_column, target_column). 'sql' - from a SQL database (keys: connection_string, query, time_column, target_column). 'url' - from a web URL pointing to CSV/Excel/Parquet (keys: url, time_column, target_column). GUIDELINES: 1. NEVER assume a column is a time index unless the user says so. 2. ALWAYS…
| Parameter | Type | Description |
|---|---|---|
config * | object | Data source configuration. Must include 'type' (pandas, sql, file, url). |
run_async | boolean | If True, loads data in the background (non-blocking) and returns a job_id. If False (default), blocks and returns the data_handle directly. |
release_data_handle
Release a data handle and free memory
| Parameter | Type | Description |
|---|---|---|
data_handle * | string | Data handle to release |
inspect_data
Inspect a loaded data handle and return rich metadata for understanding the series before modelling. Returns mtype, scitype, shape, column names, dtypes, index level names, inferred frequency, cutoff (last training timestamp), total missing-value count, a 5-row head preview, and per-column summary statistics. Works on handles from load_data_source, split_data, or transform_data. Does not modify the data.
| Parameter | Type | Description |
|---|---|---|
data_handle * | string | Data handle ID to inspect (from load_data_source, split_data, or transform_data). |
split_data
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.
| Parameter | Type | Description |
|---|---|---|
data_handle * | string | Data handle ID to split (from load_data_source or transform_data). |
fh | integer | array | Forecast 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_size | number | Fraction of observations to hold out for the test set, exclusive range (0.0, 1.0), rounded up to a whole observation. Must leave at least one training observation. Mutually exclusive with fh. |
transform_data
Transform a loaded data handle and return a new handle. action='format' (default): auto-fix common time series issues — infer/set frequency, remove duplicate timestamps, fill index gaps, and forward/backward-fill missing values; returns changes_applied. action='convert': convert y to a different sktime mtype via convert_to() (requires to_mtype, e.g. 'pd.DataFrame', 'pd.Series', 'np.ndarray'). Replaces the legacy format_time_series tool.
| Parameter | Type | Description |
|---|---|---|
data_handle * | string | Data handle ID to transform. |
action | string | Transformation to apply: 'format' (default) or 'convert'. |
auto_infer_freq | boolean | (format only) Infer and set DatetimeIndex frequency (default: true). |
fill_missing | boolean | (format only) Forward/backward fill missing values (default: true). |
remove_duplicates | boolean | (format only) Drop duplicate timestamps, keeping first (default: true). |
to_mtype | string | (convert only, required) Target sktime mtype string, e.g. 'pd.DataFrame', 'pd.Series', 'np.ndarray'. |
save_data
Persist the target series (y) and any exogenous features (X) behind a data handle to a local file. Combines y and X into one table. Creates parent directories as needed. Supported formats: csv (default, writes index as first column), parquet, json (records orient, ISO dates).
| Parameter | Type | Description |
|---|---|---|
data_handle * | string | Data handle ID to export (from load_data_source, split_data, or transform_data). |
path * | string | Destination file path. Format is controlled by the format argument, not the file extension. |
format | string | Output format: csv (default), parquet, or json. |
overwrite | boolean | Replace the file if it already exists. Default false — an existing file is not clobbered unless this is true. |
plot_series
Plot one or more time series natively, e.g. the train and test handles from split_data together with the prediction_handle returned by predict. Saves the plot to `path` when given. Otherwise PNG and WebP plots are returned as an MCP image content block, and SVG as a base64 string.
| Parameter | Type | Description |
|---|---|---|
data_handles * | array | List of data handle IDs to plot (e.g., train, test, forecasts). |
dpi | integer | Resolution in dots per inch (default: 150). |
figsize | array | Figure size as [width, height] in inches (default: [12, 6]). |
image_format | string | Image output format: 'png' (default), 'svg', or 'webp'. |
labels | array | Optional list of labels corresponding to each data handle. |
markers | string | array | Marker style(s) for data points (e.g., 'o', ['.', 'x']). |
path | string | Optional local file path to save the plot (e.g., '/tmp/plot.png'). If omitted, the plot is returned inline. |
title | string | Optional title for the plot. |
x_label | string | Custom x-axis label. |
y_label | string | Custom y-axis label. |
export_code
Export an estimator or pipeline as executable Python code
| Parameter | Type | Description |
|---|---|---|
handle * | string | Handle ID of the estimator/pipeline to export |
dataset | string | Optional dataset name for the fit example (e.g. 'airline', 'sunspots'). Defaults to 'airline' if omitted. |
include_fit_example | boolean | Whether to include a fit/predict example (default: false) |
var_name | string | Variable name to use in generated code (default: 'model') |
save_model
Save an estimator/pipeline handle using sktime MLflow integration
| Parameter | Type | Description |
|---|---|---|
estimator_handle * | string | Handle ID of the estimator to save |
path * | string | Local directory or URI where the model will be saved |
mlflow_params | object | Optional extra parameters for sktime.utils.mlflow_sktime.save_model |
load_model
Load a saved sktime model from a local path and register it for use
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to the saved model directory |
check_job_status
Check the status and progress of a background job
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job ID to check |
list_jobs
List all background jobs with optional status filter
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of jobs to return per page (default: 20) |
offset | integer | Number of jobs to skip for pagination (default: 0) |
status | string | Filter by status: pending, running, completed, failed, cancelled |
cancel_job
Cancel a running or pending background job. Set delete=true to also remove the job record entirely (useful for cleaning up completed/failed jobs).
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job ID to cancel |
delete | boolean | Also remove the job record after cancelling (default: false) |
run_command
Run an arbitrary CLI/bash command on the HOST machine, in the server's working directory, as the user that launched the server (not a container or sandbox). Use it to install packages into the server's environment (e.g. the server's python -m pip install mlflow) or inspect the filesystem. Output is capped; a 'truncated' flag indicates when it was shortened.
| Parameter | Type | Description |
|---|---|---|
command * | string | The shell command to run (executed via /bin/sh -c). |