get_directors_by_name
Search for directors by name across all companies in the Spanish stock exchange to analyze corporate relationships.
Instructions
Search for directors by name across all companies
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Director name or partial match |
Implementation Reference
- src/database.ts:129-135 (handler)The core handler function that executes the tool logic by fetching network data from the API and filtering directors by the provided name.
async getDirectorsByName(name: string): Promise<any[]> { const data = await this.fetchAPI('/api/network'); const directors = data.directors || []; return directors.filter(director => director.name && director.name.toLowerCase().includes(name.toLowerCase()) ); } - src/index.ts:128-141 (schema)Defines the tool's input schema, including the required 'name' parameter for searching directors.
{ name: 'get_directors_by_name', description: 'Search for directors by name across all companies', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Director name or partial match', }, }, required: ['name'], }, }, - src/index.ts:601-603 (registration)Registers the tool handler in the CallToolRequestSchema switch statement, delegating to the database method.
case 'get_directors_by_name': result = await this.db.getDirectorsByName((args as any)?.name); break;