Skip to main content
Glama
mod-us

Modus MCP Server

Official
by mod-us

modus_get_performance_leaderboard

Retrieve top sales performers ranked by opportunities, pipeline, bookings, ASP, and close rate. Filter results by year, quarter, month, and number of performers.

Instructions

Get top sales performers across key metrics including opportunities created/won, pipeline created, bookings, ASP, and close rate. Returns ranked list of top performers for each metric.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNoYear for performance data
quarterNoQuarter number (1-4)
monthNoMonth number (1-12)
limitNoNumber of top performers to show per metric

Implementation Reference

  • The handler function for the 'modus_get_performance_leaderboard' tool. It extracts year, quarter, month, and limit arguments, calls the Modus API endpoint /api/sales/performance/leaderboard, computes summary statistics (top performers overall, metrics tracked, unique performers count), and returns the result.
    case "modus_get_performance_leaderboard": {
      const { year, quarter, month, limit = 6 } = args || {};
      const params = new URLSearchParams();
    
      if (year) params.append("year", year.toString());
      if (quarter) params.append("quarter", quarter.toString());
      if (month) params.append("month", month.toString());
      if (limit) params.append("limit", limit.toString());
    
      response = await modusApi.get(`/api/sales/performance/leaderboard?${params.toString()}`);
      const leaderboard = response.data;
    
      // Add summary statistics
      const summary = {
        topPerformersOverall: identifyTopPerformersOverall(leaderboard),
        metricsTracked: Object.keys(leaderboard || {}).length,
        totalUniquePerformers: countUniquePerformers(leaderboard),
      };
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ summary, leaderboard }, null, 2),
          },
        ],
      };
    }
  • The input schema definition for the 'modus_get_performance_leaderboard' tool. Defines parameters: year (number), quarter (number 1-4), month (number 1-12), and limit (number, default 6).
    {
      name: "modus_get_performance_leaderboard",
      description:
        "Get top sales performers across key metrics including opportunities created/won, pipeline created, bookings, ASP, and close rate. Returns ranked list of top performers for each metric.",
      inputSchema: {
        type: "object",
        properties: {
          year: {
            type: "number",
            description: "Year for performance data",
          },
          quarter: {
            type: "number",
            description: "Quarter number (1-4)",
          },
          month: {
            type: "number",
            description: "Month number (1-12)",
          },
          limit: {
            type: "number",
            default: 6,
            description: "Number of top performers to show per metric",
          },
        },
      },
    },
  • The tool name 'modus_get_performance_leaderboard' is registered in the TOOLS array (line 264) and the corresponding handler case is in the switch statement (line 901).
    {
      name: "modus_get_performance_leaderboard",
      description:
        "Get top sales performers across key metrics including opportunities created/won, pipeline created, bookings, ASP, and close rate. Returns ranked list of top performers for each metric.",
      inputSchema: {
        type: "object",
        properties: {
          year: {
            type: "number",
            description: "Year for performance data",
          },
          quarter: {
            type: "number",
            description: "Quarter number (1-4)",
          },
          month: {
            type: "number",
            description: "Month number (1-12)",
          },
          limit: {
            type: "number",
            default: 6,
            description: "Number of top performers to show per metric",
          },
        },
      },
    },
  • Helper function 'identifyTopPerformersOverall' that counts appearances of performers across leaderboard metrics to identify top overall performers.
    function identifyTopPerformersOverall(leaderboard) {
      if (!leaderboard || typeof leaderboard !== "object") return [];
      const performerCounts = {};
    
      Object.keys(leaderboard).forEach((metric) => {
        if (Array.isArray(leaderboard[metric])) {
          leaderboard[metric].forEach((performer) => {
            const name = performer.employeeName || performer.name;
            if (name) {
              performerCounts[name] = (performerCounts[name] || 0) + 1;
            }
          });
        }
      });
    
      return Object.entries(performerCounts)
        .sort((a, b) => b[1] - a[1])
        .slice(0, 3)
        .map(([name, count]) => ({ name, appearances: count }));
    }
  • Helper function 'countUniquePerformers' that counts unique performer names across all leaderboard metrics.
    function countUniquePerformers(leaderboard) {
      if (!leaderboard || typeof leaderboard !== "object") return 0;
      const uniqueNames = new Set();
    
      Object.keys(leaderboard).forEach((metric) => {
        if (Array.isArray(leaderboard[metric])) {
          leaderboard[metric].forEach((performer) => {
            const name = performer.employeeName || performer.name;
            if (name) uniqueNames.add(name);
          });
        }
      });
    
      return uniqueNames.size;
    }
Behavior3/5

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

With no annotations, the description carries the full burden. It states the output is a ranked list per metric, which implies read-only behavior, but does not disclose additional traits like sorting order, pagination beyond the limit parameter, or handling of missing data.

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?

Two concise sentences front-load the purpose and output format. No fluff or redundant information.

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 no output schema, the description lacks details about the result structure (e.g., fields, ordering). It covers the core functionality but leaves some ambiguity about the output shape and optional parameter combinations.

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?

Schema coverage is 100% with adequate parameter descriptions. The tool description adds no extra meaning beyond listing the metrics; it does not explain how year, quarter, and month interact (e.g., whether all are required together). Baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly identifies the tool's purpose: retrieving top sales performers across specific metrics (opportunities, pipeline, bookings, ASP, close rate). It distinguishes from sibling tools like 'modus_get_sales_breakdown' by focusing on ranked leaderboards.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives. The description implies it is for leaderboard-style ranking, but lacks when-not-to-use or alternative tool names.

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/mod-us/modus-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server