Skip to main content
Glama

get_most_active_lobbyists

Identify organizations with the highest number of EU lobbying meetings to analyze influence patterns and regulatory engagement.

Instructions

Get organizations with the most EU lobbying meetings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results

Implementation Reference

  • Core handler function that fetches lobbying data from API, aggregates meetings by organization, computes statistics, and returns top N most active lobbyists.
    async getMostActiveLobbyists(limit: number = 10): Promise<any[]> { const data = await this.fetchAPI('/api/lobbying'); const meetings = data.meetings || data.lobbying || []; // Group by organization and count meetings const orgCounts = new Map(); meetings.forEach(meeting => { const org = meeting.organization_name; if (!org) return; if (!orgCounts.has(org)) { orgCounts.set(org, { organization_name: org, meeting_count: 0, institutions: new Set(), spending: [] }); } const entry = orgCounts.get(org); entry.meeting_count++; if (meeting.eu_institution) entry.institutions.add(meeting.eu_institution); if (meeting.quarterly_spending) entry.spending.push(meeting.quarterly_spending); }); return Array.from(orgCounts.values()) .map(entry => ({ ...entry, institutions: Array.from(entry.institutions).join(','), avg_spending: entry.spending.length > 0 ? entry.spending.reduce((sum, val) => sum + val, 0) / entry.spending.length : null })) .sort((a, b) => b.meeting_count - a.meeting_count) .slice(0, limit); }
  • MCP CallToolRequest handler case that invokes the database method with optional limit parameter.
    case 'get_most_active_lobbyists': result = await this.db.getMostActiveLobbyists((args as any)?.limit || 10); break;
  • src/index.ts:286-298 (registration)
    Tool registration in ListToolsRequest handler, including schema for optional limit parameter.
    name: 'get_most_active_lobbyists', description: 'Get organizations with the most EU lobbying meetings', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Maximum number of results', default: 10, }, }, }, },

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