Skip to main content
Glama

get_most_active_lobbyists

Identify organizations with the most EU lobbying meetings to analyze influence in regulatory processes.

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 meetings data from the API, groups meetings by organization, counts occurrences, aggregates institutions and spending, then returns the top N most active lobbyists sorted by meeting count.
    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);
    }
  • src/index.ts:285-298 (registration)
    Tool registration in the listTools handler, defining the tool name, description, and input schema (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,
          },
        },
      },
    },
  • MCP CallToolRequest handler switch case that extracts the limit argument and delegates to the DatabaseManager's getMostActiveLobbyists method.
    case 'get_most_active_lobbyists':
      result = await this.db.getMostActiveLobbyists((args as any)?.limit || 10);
      break;
  • JSON schema defining the tool's input parameters (optional limit with default 10).
    inputSchema: {
      type: 'object',
      properties: {
        limit: {
          type: 'number',
          description: 'Maximum number of results',
          default: 10,
        },
      },
    },
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 retrieves data ('Get'), implying a read-only operation, but does not clarify aspects like whether it requires authentication, has rate limits, returns paginated results, or what the output format entails (e.g., list of organizations with counts). For a tool with no annotation coverage, this is a significant gap in transparency.

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, clear sentence: 'Get organizations with the most EU lobbying meetings.' It is front-loaded with the core purpose, has no unnecessary words, and efficiently communicates the tool's function without redundancy. This makes it easy for an agent to parse and understand quickly.

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

Completeness2/5

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

Given the complexity of a ranking tool (implied by 'most active'), no annotations, and no output schema, the description is incomplete. It does not explain how 'most active' is determined (e.g., based on meeting frequency or other metrics), what data is returned (e.g., organization names and counts), or any behavioral constraints. For a tool that likely involves sorting and limiting results, more context is needed to guide effective use.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'limit' parameter well-documented as 'Maximum number of results' with a default of 10. The description does not add any semantic details beyond this, such as explaining how 'most active' is calculated (e.g., by meeting count) or if other filters apply. Given the high schema coverage, a baseline score of 3 is appropriate, as the description does not compensate but also does not detract.

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: 'Get organizations with the most EU lobbying meetings.' It specifies the verb ('Get'), resource ('organizations'), and scope ('EU lobbying meetings'), making the function unambiguous. However, it does not explicitly differentiate from sibling tools like 'get_lobbying_meetings' or 'get_all_companies,' which could provide similar or overlapping data, preventing 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 does not mention when this tool is preferred over siblings like 'get_lobbying_meetings' (which might list meetings directly) or 'get_all_companies' (which could include lobbying data), nor does it specify prerequisites or exclusions. This lack of contextual direction leaves the agent to infer usage based on the name alone.

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