Skip to main content
Glama

Initiate Analysis

initiate_analysis
Destructive

Initiate a full StockLens AI analysis for a specific stock. Starting a new run may consume one Analysis credit (LENS_AI) or one Plus Analysis credit (LENS_AI_PLUS, which may add AI narratives). Returns an analysis_id immediately — completion is asynchronous. Retrieve status or results with a separate fetch_analysis_result call when the user asks for them. A recent matching analysis may be reused; the receipt explicitly reports new_run_started and reused_existing without claiming an asynchronous credit charge has completed. Concurrent identical initiations receive retry guidance. Free supports the standard Analysis only; Pro and Max plans include Plus Analysis. Does NOT screen, rank, or compare across multiple stocks — call discover_stocks for any multi-stock or "top N" request. Does NOT execute trades, place orders, or move funds. Does NOT accept more than one ticker per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoAnalysis depth: standard or plus. Standard consumes an Analysis credit (LENS_AI). Plus consumes a Plus Analysis credit (LENS_AI_PLUS) and may add AI narratives. Default standard.
tickerYesStock ticker symbol (e.g. AAPL)
exchangeNoExchange code (e.g. NASDAQ). Optional - resolved automatically if omitted.
time_rangeNoTime horizon — shapes which signals the analysis weighs most (shorter horizons favor price action, momentum and news; longer favor fundamentals and quality). Not a price forecast. One window per calibrated band: short_2_wk (Short-term), medium_1_mo (Medium-term), long_1_yr (Long-term). Default medium_1_mo. The legacy medium_2_mo and long_2_yr aliases are still accepted and resolve to medium_1_mo and long_1_yr respectively.
risk_toleranceNoAnalysis focus — reweights how much the analysis weighs downside/quality risk vs. growth/fundamentals. NOT a personal risk or suitability assessment, and it never changes the company's underlying facts. low=Defensive, medium=Balanced, high=Growth. Default medium.
analysis_emphasisNoOptional. RISK_EMPHASIS | BALANCED | FUNDAMENTAL_GROWTH_EMPHASIS. Must agree with the emphasis implied by risk_tolerance (low->RISK_EMPHASIS, medium->BALANCED, high->FUNDAMENTAL_GROWTH_EMPHASIS); a mismatch is rejected as a validation error before any credit is consumed.
evidence_history_familyNoOptional. SHORT_HISTORY | MEDIUM_HISTORY | LONG_HISTORY. Must agree with the family implied by time_range (short_2_wk->SHORT_HISTORY, medium_1_mo/medium_2_mo->MEDIUM_HISTORY, long_1_yr/long_2_yr->LONG_HISTORY); a mismatch is rejected as a validation error before any credit is consumed. Does not select a representative range on its own.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthYes
scopeYes
statusYes
analysis_idYes
credit_typeYes
new_run_startedYes
reused_existingYes
estimated_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / exchange / description
      Previous value: -"Exchange code (e.g. NASDAQ). Optional."New value: +"Exchange code (e.g. NASDAQ). Optional - resolved automatically if omitted."
  2. Changed3 schema fields changed
    • addedInput schema / properties / ticker / pattern
      Added value: +"^[A-Za-z][A-Za-z.\\-]{0,9}$"
    • addedOutput schema / properties / scope
      Added value: +{
      +  "enum": [
      +    "single_analysis_receipt"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "analysis_id",
      -  "status",
      -  "estimated_seconds",
      -  "depth",
      -  "credit_type",
      -  "new_run_started",
      -  "reused_existing"
      -]New value: +[
      +  "analysis_id",
      +  "status",
      +  "estimated_seconds",
      +  "depth",
      +  "credit_type",
      +  "new_run_started",
      +  "reused_existing",
      +  "scope"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / depth / description
      Previous value: -"Analysis depth: standard or plus. Standard uses LENS_AI credit. Plus uses LENS_AI_PLUS credit and may add AI narratives. Default standard."New value: +"Analysis depth: standard or plus. Standard consumes an Analysis credit (LENS_AI). Plus consumes a Plus Analysis credit (LENS_AI_PLUS) and may add AI narratives. Default standard."
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already signal destructiveHint=true and readOnlyHint=false, so the description doesn't need to restate mutation. It adds critical context: credit consumption, asynchronous completion, reuse behavior, concurrent handling, and what the receipt reports. It goes beyond the annotation by explaining that credit charge may not be complete and that identical initiations get retry guidance, which is valuable for an agent managing side effects.

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 dense and comprehensive, which is appropriate for a complex tool, but it could be tightened. It front-loads the core purpose and async behavior, then covers exclusions and plan details. Some redundancy exists (e.g., credit mentions appear multiple times), and the length might reduce scannability, but every sentence contributes to avoiding misuse.

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?

Given the tool's complexity (7 params, credit implications, async flow, plan variations), the description covers all critical aspects: what returns immediately, how to get results, reuse and concurrency, plan differences, and what it does not do. Combined with the detailed schema and output schema, an agent has enough to call it correctly. Minor gaps: it doesn't specify typical analysis_id format or timeout expectations, but these are less critical given the guidance to fetch results separately.

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

Parameters3/5

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

Schema covers 100% of parameters with rich descriptions including enums, defaults, and alignment rules (e.g., risk_tolerance and analysis_emphasis). The description adds meaningful context beyond the schema: it clarifies that time_range is not a price forecast, that analysis_emphasis mismatches are rejected before credit consumption, and that evidence_history_family doesn't select a range on its own. These additions earn a 3, but since the schema already carries most of the semantic weight, the baseline of 3 is appropriate.

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 initiates a full StockLens AI analysis for a specific stock, with explicit scoping (single ticker) and immediate vs asynchronous behavior. It distinguishes itself from siblings by naming discover_stocks for multi-stock requests and fetch_analysis_result for retrieving results, so an agent knows exactly what this tool does and what it doesn't.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance (initiate analysis, retrieve results separately), when-not-to (does not screen, rank, compare, or trade), and names the alternative (discover_stocks for multi-stock, fetch_analysis_result for results). It also covers concurrency, credit consumption, and plan differences, leaving no ambiguity about selection.

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.

Resources