Skip to main content
Glama
paperinvest

Paper MCP Server

by paperinvest

get_market_hours

Retrieve market hours for specific exchanges via the Paper MCP Server. Enables AI assistants to provide trading schedule details using natural language queries, supporting informed trading decisions.

Instructions

Get market hours for an exchange

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exchangeNoExchange name (optional)

Implementation Reference

  • Handler implementation for the 'get_market_hours' tool. Fetches market hours from the API endpoint, optionally filtered by exchange.
    case 'get_market_hours':
      if (args.exchange) {
        response = await api.get(`/market-data/market-hours/${args.exchange}`);
      } else {
        response = await api.get('/market-data/market-hours');
      }
      break;
  • Tool definition including name, description, and input schema for 'get_market_hours' used in tool registration.
      name: 'get_market_hours',
      description: 'Get market hours for an exchange',
      inputSchema: {
        type: 'object',
        properties: {
          exchange: { type: 'string', description: 'Exchange name (optional)' }
        }
      }
    },
  • src/index.ts:388-392 (registration)
    Registration of all tools including 'get_market_hours' via the tools array returned in ListTools handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools
      };
    });
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 of behavioral disclosure. It states what the tool does but doesn't mention whether it requires authentication, returns real-time or cached data, has rate limits, or what format the market hours are returned in. For a financial data tool with no annotation coverage, this is a significant gap.

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 states the core purpose without any wasted words. It's appropriately sized for a simple lookup tool and front-loads the essential information.

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 with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what format the market hours are returned in (e.g., time ranges, timezone), whether it includes holidays, or how it interacts with other market-related tools. Given the financial context and sibling tools, more detail is needed.

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?

Schema description coverage is 100%, so the schema already documents the single parameter 'exchange' as optional. The description doesn't add any additional context about parameter usage beyond what's in the schema, such as which exchanges are supported or what happens when the parameter is omitted. Baseline 3 is appropriate when the schema does the heavy lifting.

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 tool's purpose with a specific verb ('Get') and resource ('market hours for an exchange'), making it immediately understandable. However, it doesn't distinguish this tool from potential siblings like 'is_market_open', which might provide related information about market status rather than specific hours.

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 'is_market_open' available, there's no indication of whether this tool is for historical hours, current day hours, or how it differs from checking market open status.

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

Related 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/paperinvest/mcp-server'

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