Skip to main content
Glama
jwaresolutions

Polygon MCP Server

get_latest_quote

Retrieve real-time stock quotes for any ticker symbol to access current market prices and trading data.

Instructions

Get real-time quote for a ticker

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickerYesTicker symbol (e.g., AAPL)

Implementation Reference

  • The handler function for get_latest_quote tool. Fetches the latest NBBO quote from Polygon API for the specified ticker and returns the JSON response or an error message.
    get_latest_quote: async (args: { ticker: string }) => {
      try {
        const response = await polygonApi.get(`/v2/last/nbbo/${args.ticker}`);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(response.data, null, 2)
          }]
        };
      } catch (error: any) {
        return {
          content: [{
            type: "text",
            text: `Error getting latest quote: ${error.response?.data?.message || error.message}`
          }],
          isError: true
        };
      }
    },
  • src/index.ts:258-271 (registration)
    Tool registration in the ListTools handler, specifying name, description, and input schema for get_latest_quote.
    {
      name: "get_latest_quote",
      description: "Get real-time quote for a ticker",
      inputSchema: {
        type: "object",
        properties: {
          ticker: {
            type: "string",
            description: "Ticker symbol (e.g., AAPL)"
          }
        },
        required: ["ticker"]
      }
    },
  • Input schema definition for the get_latest_quote tool, requiring a 'ticker' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        ticker: {
          type: "string",
          description: "Ticker symbol (e.g., AAPL)"
        }
      },
      required: ["ticker"]
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'real-time' which hints at current data, but doesn't cover important aspects like rate limits, authentication needs, data freshness guarantees, error conditions, or what the return format might look like. This is inadequate for a tool that likely interacts with external APIs.

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 gets straight to the point with zero wasted words. It's appropriately sized for a simple tool with one parameter and is perfectly front-loaded.

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 tool that fetches real-time financial data (implied complexity), with no annotations and no output schema, the description is insufficient. It doesn't explain what a 'quote' includes (price? volume? bid/ask?), doesn't mention data sources or limitations, and provides no behavioral context. The agent would be operating with significant uncertainty.

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?

The schema description coverage is 100%, with the single parameter 'ticker' well-documented in the schema. The description doesn't add any meaningful parameter information beyond what the schema already provides (it just repeats 'for a ticker'), so it meets the baseline for high schema coverage.

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 action ('Get real-time quote') and resource ('for a ticker'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_snapshot' or 'get_ticker_details' that might also provide quote-related data, so it doesn't reach the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives like 'get_snapshot' or 'get_daily_open_close'. It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from the name alone.

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

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