Skip to main content
Glama

get_company_shareholders

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

Instructions

Get shareholders for a specific company

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIdYesCompany ID

Implementation Reference

  • Core handler function that implements the tool logic: fetches shareholder positions from the API endpoint '/api/shareholder-positions', resolves the company symbol from company ID, and filters shareholders matching the company's symbol.
    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 listTools handler, defining the tool 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 the CallToolRequestSchema that invokes the database method with the provided companyId argument.
    case 'get_company_shareholders': result = await this.db.getCompanyShareholders((args as any)?.companyId); break;

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