Skip to main content
Glama
jwaresolutions

Polygon MCP Server

get_ticker_news

Retrieve news articles for a specific stock ticker symbol to monitor market developments and inform investment decisions.

Instructions

Get news articles for a ticker

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickerYesTicker symbol (e.g., AAPL)
limitNoNumber of articles to return (default: 10)

Implementation Reference

  • The handler function for get_ticker_news tool. Fetches news articles for a given ticker symbol using the Polygon API v2/reference/news endpoint. Returns formatted JSON response or error message.
    get_ticker_news: async (args: { ticker: string; limit?: number }) => {
      try {
        const params: any = {
          limit: args.limit || 10
        };
        const response = await polygonApi.get(`/v2/reference/news`, {
          params: {
            ...params,
            ticker: args.ticker
          }
        });
        return {
          content: [{
            type: "text",
            text: JSON.stringify(response.data, null, 2)
          }]
        };
      } catch (error: any) {
        return {
          content: [{
            type: "text",
            text: `Error getting ticker news: ${error.response?.data?.message || error.message}`
          }],
          isError: true
        };
      }
    },
  • src/index.ts:338-355 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema for get_ticker_news.
    {
      name: "get_ticker_news",
      description: "Get news articles for a ticker",
      inputSchema: {
        type: "object",
        properties: {
          ticker: {
            type: "string",
            description: "Ticker symbol (e.g., AAPL)"
          },
          limit: {
            type: "number",
            description: "Number of articles to return (default: 10)"
          }
        },
        required: ["ticker"]
      }
    },
  • Input schema definition for the get_ticker_news tool, specifying parameters ticker (required string) and optional limit (number).
    inputSchema: {
      type: "object",
      properties: {
        ticker: {
          type: "string",
          description: "Ticker symbol (e.g., AAPL)"
        },
        limit: {
          type: "number",
          description: "Number of articles to return (default: 10)"
        }
      },
      required: ["ticker"]
    }

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/jwaresolutions/polygon-mcp-server'

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