Skip to main content
Glama

get_shareholder_overlap

Identify investors holding shares across multiple companies in Spain's IBEX 35 stock index to analyze market concentration and investment patterns.

Instructions

Find shareholders who own stakes in multiple IBEX 35 companies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of getShareholderOverlap: fetches shareholder data via API, groups positions by shareholder name, identifies overlaps (multiple companies), calculates average ownership percentage, and sorts by company count.
    async getShareholderOverlap(): Promise<any[]> { const data = await this.fetchAPI('/api/shareholder-positions'); const shareholders = data.shareholderPositions || data.positions || []; // Group by shareholder name const shareholderMap = new Map(); shareholders.forEach(position => { const name = position.shareholder_name || position.name; if (!name) return; if (!shareholderMap.has(name)) { shareholderMap.set(name, []); } shareholderMap.get(name).push(position); }); const overlaps = []; for (const [name, positions] of shareholderMap.entries()) { if (positions.length > 1) { const companies = positions.map(p => p.company_symbol || p.ticker).filter(Boolean); const avgPercentage = positions.reduce((sum, p) => sum + (p.percentage || 0), 0) / positions.length; overlaps.push({ shareholder_name: name, companies: companies.join(','), company_count: companies.length, avg_percentage: avgPercentage }); } } return overlaps.sort((a, b) => b.company_count - a.company_count); }
  • src/index.ts:158-165 (registration)
    Registers the MCP tool 'get_shareholder_overlap' with description and parameterless input schema in the ListToolsRequestSchema response.
    { name: 'get_shareholder_overlap', description: 'Find shareholders who own stakes in multiple IBEX 35 companies', inputSchema: { type: 'object', properties: {}, }, },
  • Tool dispatch handler in CallToolRequestSchema: maps tool call to this.db.getShareholderOverlap() execution.
    case 'get_shareholder_overlap': result = await this.db.getShareholderOverlap(); break;
  • Input schema definition: empty properties object indicating no required parameters.
    inputSchema: { type: 'object', properties: {}, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anbrme/ibex35-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server