Skip to main content
Glama

get_historical_prices

Retrieve historical stock price data for Spanish companies to analyze market trends and performance over specified time periods.

Instructions

Get historical price data for a company

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIdYesCompany ID
daysNoNumber of days of historical data

Implementation Reference

  • Defines the tool schema for get_historical_prices including name, description, and input schema.
    {
      name: 'get_historical_prices',
      description: 'Get historical price data for a company',
      inputSchema: {
        type: 'object',
        properties: {
          companyId: {
            type: 'string',
            description: 'Company ID',
          },
          days: {
            type: 'number',
            description: 'Number of days of historical data',
            default: 30,
          },
        },
        required: ['companyId'],
      },
    },
  • src/index.ts:617-619 (registration)
    Registers the tool handler in the MCP CallToolRequestSchema switch statement, delegating to DatabaseManager.
    case 'get_historical_prices':
      result = await this.db.getHistoricalPrices((args as any)?.companyId, (args as any)?.days || 30);
      break;
  • Implements the core logic for retrieving historical prices by resolving company ID to symbol and calling the API endpoint.
    async getHistoricalPrices(companyId: string, days: number = 30): Promise<any[]> {
      // Find company symbol from ID
      const companies = await this.getAllCompanies();
      const company = companies.find(c => c.id === companyId);
      if (!company) return [];
    
      const data = await this.fetchAPI('/api/historical-prices/company', {
        symbol: company.symbol,
        days: days
      });
      
      return data.historicalData || [];
    }
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 the tool 'Get[s] historical price data', implying a read-only operation, but doesn't specify data format (e.g., time series), access permissions, rate limits, or error conditions. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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: 'Get historical price data for a company'. It is appropriately sized and front-loaded, directly stating the core purpose 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 no annotations, no output schema, and 2 parameters with full schema coverage, the description is minimally adequate. It covers the basic purpose but lacks behavioral details (e.g., data format, errors) and usage context. For a simple read tool, it meets the minimum viable threshold but has clear gaps in completeness.

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%, with clear parameter descriptions in the schema (e.g., 'Company ID', 'Number of days of historical data'). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate since 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 as 'Get historical price data for a company', specifying the verb 'Get' and resource 'historical price data' with the target 'company'. It distinguishes from siblings like 'get_company_by_symbol' or 'get_all_companies' by focusing on price data, but doesn't explicitly differentiate from tools like 'analyze_trends' or 'compare_companies' that might involve price data indirectly.

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. It doesn't mention prerequisites (e.g., needing a company ID), exclusions (e.g., not for real-time data), or comparisons to siblings like 'get_company_by_symbol' for company details or 'analyze_trends' for analysis. Usage is implied only by the purpose statement.

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/anbrme/ibex35-mcp-server'

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