get_company_directors
Retrieve board director information for companies on the Spanish stock exchange by providing a company ID.
Instructions
Get board directors for a specific company
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyId | Yes | Company ID or use get_company_by_symbol first to get ID |
Implementation Reference
- src/index.ts:106-119 (registration)Tool registration including name, description, and input schema definition.{ name: 'get_company_directors', description: 'Get board directors for a specific company', inputSchema: { type: 'object', properties: { companyId: { type: 'string', description: 'Company ID or use get_company_by_symbol first to get ID', }, }, required: ['companyId'], }, },
- src/index.ts:593-595 (handler)MCP tool dispatch handler that calls the database method with companyId argument.case 'get_company_directors': result = await this.db.getCompanyDirectors((args as any)?.companyId); break;
- src/database.ts:82-86 (handler)Core implementation fetching network data from API and filtering directors by company ID.async getCompanyDirectors(companyId: string): Promise<any[]> { const data = await this.fetchAPI('/api/network'); const directors = data.directors || []; return directors.filter(director => director.company_id === companyId); }