get_company_by_symbol
Retrieve detailed company information using stock symbols to analyze Spanish stock exchange relationships and access financial data.
Instructions
Get detailed information for a specific company by its stock symbol
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock symbol (e.g., SAN, TEF, IBE) |
Implementation Reference
- src/database.ts:57-60 (handler)Core implementation of the tool logic: fetches all companies from the API and returns the one matching the given symbol.async getCompanyBySymbol(symbol: string): Promise<any> { const companies = await this.getAllCompanies(); return companies.find(company => company.symbol === symbol) || null; }
- src/index.ts:60-72 (schema)Defines the tool schema including name, description, and input schema requiring a 'symbol' string.name: 'get_company_by_symbol', description: 'Get detailed information for a specific company by its stock symbol', inputSchema: { type: 'object', properties: { symbol: { type: 'string', description: 'Stock symbol (e.g., SAN, TEF, IBE)', }, }, required: ['symbol'], }, },
- src/index.ts:581-583 (registration)Registers the handler for the tool in the CallToolRequest switch statement, delegating to DatabaseManager.getCompanyBySymbol.case 'get_company_by_symbol': result = await this.db.getCompanyBySymbol((args as any)?.symbol); break;