Skip to main content
Glama
jwaresolutions

Polygon MCP Server

get_daily_open_close

Retrieve daily open and close prices for a specific stock on a given date using Polygon.io financial data.

Instructions

Get daily open/close prices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickerYesTicker symbol (e.g., AAPL)
dateYesDate (YYYY-MM-DD format)

Implementation Reference

  • The asynchronous handler function that implements the get_daily_open_close tool by calling the Polygon API to retrieve daily open and close prices for a given ticker and date.
    get_daily_open_close: async (args: { ticker: string; date: string }) => {
      try {
        const response = await polygonApi.get(`/v1/open-close/${args.ticker}/${args.date}`);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(response.data, null, 2)
          }]
        };
      } catch (error: any) {
        return {
          content: [{
            type: "text",
            text: `Error getting daily open/close: ${error.response?.data?.message || error.message}`
          }],
          isError: true
        };
      }
    },
  • src/index.ts:312-329 (registration)
    Registration of the get_daily_open_close tool in the ListTools handler, including its name, description, and input schema for validation.
    {
      name: "get_daily_open_close",
      description: "Get daily open/close prices",
      inputSchema: {
        type: "object",
        properties: {
          ticker: {
            type: "string",
            description: "Ticker symbol (e.g., AAPL)"
          },
          date: {
            type: "string",
            description: "Date (YYYY-MM-DD format)"
          }
        },
        required: ["ticker", "date"]
      }
    },
  • Input schema defining the parameters (ticker and date) for the get_daily_open_close tool.
    inputSchema: {
      type: "object",
      properties: {
        ticker: {
          type: "string",
          description: "Ticker symbol (e.g., AAPL)"
        },
        date: {
          type: "string",
          description: "Date (YYYY-MM-DD format)"
        }
      },
      required: ["ticker", "date"]
    }

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