Skip to main content
Glama
jwaresolutions

Polygon MCP Server

get_snapshot

Retrieve current market data snapshots for specified stock tickers to analyze real-time financial performance and trading metrics.

Instructions

Get snapshot of ticker(s)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickersYesComma-separated list of tickers (e.g., AAPL,MSFT,GOOGL)

Implementation Reference

  • The async handler function implementing the 'get_snapshot' tool logic. It calls the Polygon API to retrieve snapshot data for given tickers and formats the response as text content or handles errors.
    get_snapshot: async (args: { tickers: string }) => { try { const response = await polygonApi.get('/v2/snapshot/locale/us/markets/stocks/tickers', { params: { tickers: args.tickers } }); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text", text: `Error getting snapshot: ${error.response?.data?.message || error.message}` }], isError: true }; } }
  • The input schema definition for the 'get_snapshot' tool, specifying the required 'tickers' parameter as a string.
    inputSchema: { type: "object", properties: { tickers: { type: "string", description: "Comma-separated list of tickers (e.g., AAPL,MSFT,GOOGL)" } }, required: ["tickers"] }
  • src/index.ts:384-396 (registration)
    The tool registration entry in the ListTools response, including name, description, and input schema for 'get_snapshot'.
    name: "get_snapshot", description: "Get snapshot of ticker(s)", inputSchema: { type: "object", properties: { tickers: { type: "string", description: "Comma-separated list of tickers (e.g., AAPL,MSFT,GOOGL)" } }, required: ["tickers"] } }

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