Skip to main content
Glama
tynorn1

Indian Stock Analysis MCP Server

by tynorn1

train_arima_model

Train ARIMA models on Indian stock data with automatic parameter selection, data transformation, and validation metrics to forecast price trends.

Instructions

Train ARIMA model with intelligent parameter selection using pmdarima auto_arima.

Provides:

  • Model training with automated ARIMA order selection via pmdarima

  • Data transformation support (log, Box-Cox) for improved normality

  • Performance metrics and validation on holdout set

  • Model persistence with caching capability

  • Error handling and graceful fallbacks

Args: ticker: Stock ticker symbol (e.g., 'RELIANCE', 'TCS', 'INFY') p: AR order (None for auto-selection) d: Differencing order (default 1 for stock prices) q: MA order (None for auto-selection) validation_split: Train-validation split ratio (default 0.2) auto_select: Use pmdarima auto_arima for parameter selection (True) or manual (False) lags: Number of lags for analysis (default 40, used for fallback ACF/PACF) period: Time period for training data ('1mo', '3mo', '6mo', '1y', '2y', '5y') transform: Data transformation type ("log", "boxcox", or None for no transformation)

Returns: List containing text analysis and ImageContent with training plot

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dNo
pNo
qNo
lagsNo
periodNo1y
tickerYes
transformNo
auto_selectNo
validation_splitNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It discloses auto-selection, data transformations, holdout validation, model persistence/caching, error handling/fallbacks, and the return format. Some details, such as what exactly gets cached or what fallbacks occur, remain vague, but the overall behavioral profile is well covered.

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?

The description is well-structured with a summary line, capability bullets, an Args list, and a Returns section, making it easy to scan. The first bullet partially repeats the opening sentence, but overall every section earns its place and the content is appropriately sized for a 9-parameter tool.

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 training tool with no annotations and no output schema, the description covers parameters, behavior, and return type sufficiently. It does not deeply explain how p/d/q interact with auto_select or what the validation metrics are, but an agent has enough context to invoke the tool correctly.

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 description coverage is 0%, so the description must compensate, and it does by explaining all nine parameters with purpose and defaults. It clarifies auto_select, validation_split, lags, period, and transform beyond the raw schema. Minor ambiguity remains around p/q 'None for auto-selection' versus the schema defaults of 1.

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 opens with a specific verb and resource: 'Train ARIMA model with intelligent parameter selection using pmdarima auto_arima.' It clearly distinguishes itself from siblings like forecast_arima_model and arima_model_diagnostics by focusing on training, parameter selection, and validation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes it clear this tool is for training an ARIMA model, not forecasting or diagnostics, but it never explicitly names alternatives or states when not to use it. An agent must infer the appropriate use case from sibling tool names rather than being given direct routing guidance.

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

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/tynorn1/stock-analysis-mcp'

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