Skip to main content
Glama
jackdark425

Financial Modeling Prep (FMP) MCP Server

by jackdark425

get_technical_indicator_sma

Calculate Simple Moving Average (SMA) for stock analysis by providing symbol, timeframe, and period to identify price trends.

Instructions

Get Simple Moving Average (SMA) technical indicator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol
timeframeYesTimeframe for technical analysis
periodNoPeriod length

Implementation Reference

  • The handler and registration for 'get_technical_indicator_sma' are combined in the call to 'server.registerTool'.
    // SMA
    server.registerTool(
      'get_technical_indicator_sma',
      {
        description: 'Get Simple Moving Average (SMA) technical indicator',
        inputSchema: TechnicalIndicatorSchema,
      },
      async (args: z.infer<typeof TechnicalIndicatorSchema>) => {
        try {
          const period = args.period || 10;
          const data = await fetchFMP<TechnicalIndicator[]>(
            `/technical-indicators/sma?symbol=${args.symbol.toUpperCase()}&timeframe=${args.timeframe}&periodLength=${period}`
          );
          return jsonResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
  • Input validation schema for 'get_technical_indicator_sma'.
    const TechnicalIndicatorSchema = z.object({
      symbol: z.string().describe('Stock ticker symbol'),
      timeframe: TimeframeSchema.describe('Timeframe for technical analysis'),
      period: z.number().optional().describe('Period length'),
    });
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does without behavioral details. It doesn't mention whether this is a read-only operation, if it requires authentication, rate limits, or what the output format looks like (e.g., numeric value, chart data). This leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a technical indicator tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., a numeric value, time-series data), how SMA is calculated, or typical interpretation. Given the complexity of financial indicators, more context is needed for effective use.

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 description coverage is 100%, so parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond the tool name implying SMA calculation. This meets the baseline for high schema coverage but doesn't enhance understanding.

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?

The description clearly states the verb ('Get') and resource ('Simple Moving Average technical indicator'), making the purpose unambiguous. However, it doesn't differentiate from its sibling tool 'get_technical_indicator_ema' (Exponential Moving Average), which would require mentioning SMA specifically distinguishes by calculation method.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'get_technical_indicator_ema' or 'get_technical_indicator_rsi'. The description lacks context about typical use cases for SMA versus other indicators, leaving the agent without usage direction.

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

Install Server

Other Tools

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/jackdark425/aigroup-fmp-mcp'

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