autots.mcp.handlers package

Submodules

autots.mcp.handlers.data module

Handlers for cache management and data loading/conversion tools.

Handlers return plain, JSON-serializable data. Transport layers (the MCP server, the Pyodide worker) are responsible for wrapping the result.

async autots.mcp.handlers.data.handle_clean_data(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_clear_cache(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_convert_long_to_wide(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_generate_synthetic_data(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_get_data(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_list_cache(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_load_data_from_file(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_load_live_data(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_load_sample_data(arguments: dict, log_progress) dict
async autots.mcp.handlers.data.handle_smart_load(arguments: dict, log_progress) dict

Load messy user data (paste / upload / URL) with auto cleanup + detection.

Accepts pasted text (CSV/TSV), a url, or base64-encoded content_base64 (CSV or XLSX; filename disambiguates). Returns a data_id plus a report describing what was cleaned and detected.

autots.mcp.handlers.features module

Handlers for event risk forecasting and time series feature detection tools.

Handlers return plain, JSON-serializable data. Plot handlers return {"image_base64": ..., "mime_type": "image/png"}. Transport layers wrap the result as needed.

async autots.mcp.handlers.features.handle_detect_features(arguments: dict, log_progress) dict
async autots.mcp.handlers.features.handle_forecast_event_risk(arguments: dict, log_progress) dict
async autots.mcp.handlers.features.handle_forecast_from_features(arguments: dict, log_progress) dict
async autots.mcp.handlers.features.handle_get_detected_features(arguments: dict, log_progress) dict
async autots.mcp.handlers.features.handle_get_event_risk_results(arguments: dict, log_progress) dict
async autots.mcp.handlers.features.handle_plot_event_risk(arguments: dict, log_progress) dict
async autots.mcp.handlers.features.handle_plot_features(arguments: dict, log_progress) dict

autots.mcp.handlers.forecast module

Handlers for running forecasts: forecast_fast, forecast_explainable, forecast_custom.

async autots.mcp.handlers.forecast.handle_forecast_custom(arguments: dict, log_progress) dict
async autots.mcp.handlers.forecast.handle_forecast_explainable(arguments: dict, log_progress) dict
async autots.mcp.handlers.forecast.handle_forecast_fast(arguments: dict, log_progress) dict

autots.mcp.handlers.prediction module

Handlers for retrieving and modifying cached predictions and AutoTS model results.

Handlers return plain, JSON-serializable data. Plot handlers return {"image_base64": ..., "mime_type": "image/png"}. Transport layers wrap the result as needed.

async autots.mcp.handlers.prediction.handle_apply_adjustments(arguments: dict, log_progress) dict
async autots.mcp.handlers.prediction.handle_apply_constraints(arguments: dict, log_progress) dict
async autots.mcp.handlers.prediction.handle_get_forecast(arguments: dict, log_progress) dict
async autots.mcp.handlers.prediction.handle_get_forecast_components(arguments: dict, log_progress) dict
async autots.mcp.handlers.prediction.handle_get_model_params(arguments: dict, log_progress) dict
async autots.mcp.handlers.prediction.handle_get_validation_results(arguments: dict, log_progress) dict
async autots.mcp.handlers.prediction.handle_plot_forecast(arguments: dict, log_progress) dict
async autots.mcp.handlers.prediction.handle_plot_validation(arguments: dict, log_progress) dict

Module contents

Tool handler registry for the AutoTS MCP server.

TOOL_HANDLERS maps each tool name to its async handler function. Every handler has the signature: async def handler(arguments: dict, log_progress) -> …