get_directors_by_name
Find directors by name across all companies in the Spanish stock exchange to analyze corporate relationships and governance structures.
Instructions
Search for directors by name across all companies
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Director name or partial match |
Implementation Reference
- src/database.ts:129-135 (handler)Core handler function that executes the tool logic: fetches director network data from API and filters directors by partial name match.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:131-140 (schema)Input schema defining the expected parameters for the tool: an object with required 'name' string field.inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Director name or partial match', }, }, required: ['name'], },
- src/index.ts:128-141 (registration)Tool registration in the listTools response, including name, description, and schema.{ 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)Dispatch/registration in the callTool handler switch statement that routes to the database method.case 'get_directors_by_name': result = await this.db.getDirectorsByName((args as any)?.name); break;