get_company_by_symbol
Retrieve detailed company information using stock symbols from the Spanish stock exchange. Input a symbol to access financial data and corporate details.
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/index.ts:581-583 (handler)The tool handler implementation that extracts the symbol argument and delegates to the database method getCompanyBySymbol.case 'get_company_by_symbol': result = await this.db.getCompanyBySymbol((args as any)?.symbol); break;
- src/index.ts:62-71 (schema)Input schema defining the expected parameter 'symbol' as a required string.inputSchema: { type: 'object', properties: { symbol: { type: 'string', description: 'Stock symbol (e.g., SAN, TEF, IBE)', }, }, required: ['symbol'], },
- src/index.ts:59-72 (registration)Tool registration in the list of tools returned by ListToolsRequestSchema, including name, description, and input schema.{ 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/database.ts:57-60 (helper)Database helper method that implements the core logic by fetching all companies and finding the one matching the symbol.async getCompanyBySymbol(symbol: string): Promise<any> { const companies = await this.getAllCompanies(); return companies.find(company => company.symbol === symbol) || null; }