Skip to main content
Glama

get_company_shareholders

Retrieve shareholder information for companies in the Spanish stock exchange to analyze ownership structures and relationships.

Instructions

Get shareholders for a specific company

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIdYesCompany ID

Implementation Reference

  • Core implementation of get_company_shareholders: fetches shareholder positions from API, looks up company symbol by ID, and filters shareholders for that company.
    async getCompanyShareholders(companyId: string): Promise<any[]> { const data = await this.fetchAPI('/api/shareholder-positions'); const shareholders = data.shareholderPositions || data.positions || []; // Find company by ID first to get symbol const companies = await this.getAllCompanies(); const company = companies.find(c => c.id === companyId); if (!company) return []; return shareholders.filter(position => position.company_symbol === company.symbol || position.ticker === company.symbol ); }
  • src/index.ts:144-157 (registration)
    Tool registration in the list of tools returned by ListToolsRequestHandler, including name, description, and input schema.
    { name: 'get_company_shareholders', description: 'Get shareholders for a specific company', inputSchema: { type: 'object', properties: { companyId: { type: 'string', description: 'Company ID', }, }, required: ['companyId'], }, },
  • Dispatch handler in CallToolRequestSchema that extracts companyId from arguments and calls the database method.
    case 'get_company_shareholders': result = await this.db.getCompanyShareholders((args as any)?.companyId); break;
  • Usage of getCompanyShareholders as a helper in company comparison analysis.
    const shareholders = await this.db.getCompanyShareholders(company.id);

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