Skip to main content
Glama
jwaresolutions

Polygon MCP Server

get_market_status

Check if financial markets are open or closed to determine trading availability and schedule planning.

Instructions

Check if markets are open

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function for the 'get_market_status' tool. It fetches the current market status from the Polygon API endpoint '/v1/marketstatus/now', formats the response as JSON text, and handles errors appropriately.
    get_market_status: async () => {
      try {
        const response = await polygonApi.get('/v1/marketstatus/now');
        return {
          content: [{
            type: "text",
            text: JSON.stringify(response.data, null, 2)
          }]
        };
      } catch (error: any) {
        return {
          content: [{
            type: "text",
            text: `Error getting market status: ${error.response?.data?.message || error.message}`
          }],
          isError: true
        };
      }
    },
  • The input schema definition for the 'get_market_status' tool as provided in the ListTools response. It specifies no required input parameters.
    {
      name: "get_market_status",
      description: "Check if markets are open",
      inputSchema: {
        type: "object",
        properties: {}
      }
    },
  • src/index.ts:402-410 (registration)
    The CallToolRequestHandler registration where tool names like 'get_market_status' are dynamically dispatched to their handlers in the toolHandlers object.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      
      if (name in toolHandlers) {
        return await (toolHandlers as any)[name](args || {});
      }
      
      throw new Error(`Unknown tool: ${name}`);
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states what the tool does but doesn't disclose behavioral traits such as whether it's read-only, requires authentication, has rate limits, or what the return format looks like. This is a significant gap for a tool with zero annotation coverage.

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 with zero waste. It's appropriately sized and front-loaded, making it easy to understand at a glance without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema), the description is adequate but has clear gaps. It lacks behavioral context and usage guidelines, which are important even for simple tools. However, it does state the core purpose clearly, making it minimally viable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, but it appropriately doesn't mention any. A baseline of 4 is applied since no parameters exist.

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 'Check if markets are open' clearly states the tool's purpose with a specific verb ('Check') and resource ('markets'), making it immediately understandable. However, it doesn't differentiate from sibling tools like get_aggregates or get_daily_open_close, which prevents a perfect 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. With siblings like get_latest_quote or get_snapshot that might provide related market data, there's no indication of context, prerequisites, or exclusions for this tool.

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