Skip to main content
Glama
jackdark425

Financial Modeling Prep (FMP) MCP Server

by jackdark425

get_price_target

Retrieve analyst price target summaries for stocks to evaluate investment potential and market sentiment.

Instructions

Get analyst price target summary for a stock

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol

Implementation Reference

  • The handler function for 'get_price_target' tool that fetches price target summary data from the FMP API.
    async (args: z.infer<typeof SymbolOnlySchema>) => {
      try {
        const data = await fetchFMP<PriceTarget[]>(`/price-target-summary?symbol=${args.symbol.toUpperCase()}`);
        return jsonResponse(data);
      } catch (error) {
        return errorResponse(error);
      }
    }
  • The registration of 'get_price_target' tool.
    server.registerTool(
      'get_price_target',
      {
        description: 'Get analyst price target summary for a stock',
        inputSchema: SymbolOnlySchema,
      },
      async (args: z.infer<typeof SymbolOnlySchema>) => {
        try {
          const data = await fetchFMP<PriceTarget[]>(`/price-target-summary?symbol=${args.symbol.toUpperCase()}`);
          return jsonResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
  • The Zod schema definition for the 'get_price_target' tool inputs.
    const SymbolOnlySchema = z.object({
      symbol: SymbolSchema.describe('Stock ticker symbol'),
    });

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