Skip to main content
Glama

get_shareholder_overlap

Identify investors holding shares across multiple IBEX 35 companies to analyze ownership patterns in the Spanish stock market.

Instructions

Find shareholders who own stakes in multiple IBEX 35 companies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function getShareholderOverlap that implements the core logic of the tool. It fetches shareholder positions from the API, groups positions by shareholder name, identifies shareholders with holdings in multiple companies, calculates average percentage ownership, and returns a sorted list of overlaps by number of companies.
    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:609-611 (registration)
    The dispatch case in the CallToolRequestSchema handler that routes calls to 'get_shareholder_overlap' to the DatabaseManager's getShareholderOverlap method.
    case 'get_shareholder_overlap':
      result = await this.db.getShareholderOverlap();
      break;
  • The tool registration entry in ListToolsRequestSchema that defines the tool name, description, and input schema (no required parameters).
    {
      name: 'get_shareholder_overlap',
      description: 'Find shareholders who own stakes in multiple IBEX 35 companies',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Usage of getShareholderOverlap in AnalyticsManager's getComplexNetworkAnalysis for network analysis.
    const shareholders = await this.db.getShareholderOverlap();
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'finds' shareholders, implying a read-only operation, but doesn't specify whether it requires authentication, has rate limits, returns structured data, or handles errors. For a tool with zero annotation coverage, this is a significant gap in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without any wasted words. It's appropriately sized for a tool with no parameters, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, no output schema, and no annotations, the description is minimally adequate. It explains what the tool does but lacks details on behavioral traits, return values, or usage context. This leaves gaps in completeness, especially since it's a read operation that might benefit from output format clarification.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the inputs. The description doesn't need to add parameter details, and it appropriately avoids redundancy. A baseline of 4 is applied since no parameters are present, and the description doesn't introduce confusion.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Find shareholders who own stakes in multiple IBEX 35 companies.' It specifies the verb ('find'), resource ('shareholders'), and scope ('multiple IBEX 35 companies'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_company_shareholders' or 'get_top_shareholders_by_sector,' which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, nor does it compare with similar tools like 'get_company_shareholders' or 'get_top_shareholders_by_sector.' This lack of usage instructions leaves the agent to infer when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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