Skip to main content
Glama

HPSILab Quant Finance

AI Prediction

get_ai_prediction
Read-onlyIdempotent

AI next-day prediction: probability the stock closes UP, a paper-trading buy/watch/sell lean (research only, not a trade instruction), and how strongly the models agree (consensus).

basis="live" (default) uses the latest available market data: while the
market is open that is today's still-trading bar, labelled intraday with
its computation time. basis="close" uses only the latest completed
session's close. Returns the model input date and close (and which of the
two it is), the model name, the blended UP probability and each of the two
models' (Random Forest, Logistic Regression) probabilities, whether they
agree, suggested stop-loss / take-profit, and the news sentiment with its
source (or a note that no headline was dated that day).

Available to every authenticated plan (Free / Pro / Enterprise); subject
to the caller's plan requests/day and requests/minute limits.

Args:
    ticker: Stock symbol, e.g. "TSLA".
    basis: "live" (default) or "close".

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": {
      "ticker": "<ticker>"
    },
    "name": "get_ai_prediction"
  }
}

Input Schema

NameRequiredDescriptionDefault
basisNo"live": latest available data (today's trading bar while the market is open). "close": latest completed session only.live
tickerYesStock ticker symbol, e.g. AAPL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / basis
      Added value: +{
      +  "default": "live",
      +  "description": "\"live\": latest available data (today's trading bar while the market is open). \"close\": latest completed session only.",
      +  "enum": [
      +    "live",
      +    "close"
      +  ],
      +  "examples": [
      +    "live"
      +  ],
      +  "title": "Basis",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / ticker / description
      Added value: +"Stock ticker symbol, e.g. AAPL."
    • addedInput schema / properties / ticker / examples
      Added value: +[
      +  "AAPL"
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations by explaining the live versus close data basis, intraday computation timing, return contents, model agreement, stop-loss/take-profit suggestions, news sentiment sourcing, and plan rate limits. The research-only warning is important context not captured by readOnlyHint alone.

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 front-loaded with the prediction outcome and then explains the data basis and return contents. It is somewhat dense and the Args block repeats schema content, but the return-value detail is justified because no output schema exists.

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 two-parameter prediction tool with no output schema, the description covers the necessary return values, data-basis behavior, model composition, plan constraints, and research-only caveat. An agent has enough information to invoke it 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 coverage is already 100%, so the baseline is 3. The description adds meaningful detail beyond the schema by expanding what live versus close means and clarifying the market-open intraday case.

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 verb and resource: an AI next-day prediction covering close-up probability, paper-trading lean, and model consensus. It is clear what the tool returns, but it does not explicitly differentiate itself from sibling analytics tools such as analyze_stock.

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?

Provides useful context that the output is research only and not a trade instruction, and explains plan availability and basis selection. However, it does not explicitly say when to use this tool instead of sibling tools like analyze_stock or get_monte_carlo.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.