Skip to main content
Glama
mod-us

Modus MCP Server

Official
by mod-us

modus_get_current_headcount

Retrieve current headcount for specific departments, roles, or employment status. Use filters to get exact employee counts by team or position.

Instructions

Get current headcount by team, role, or department with filtering. Returns employee data including roles, departments, and employment status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
departmentNoFilter by department name (e.g., 'Sales', 'Engineering')
roleNoFilter by job role (e.g., 'Account Executive', 'SDR')
statusNoFilter by employment statusACTIVE

Implementation Reference

  • Schema definition for modus_get_current_headcount tool, with input properties: department (string), role (string), status (enum: ACTIVE/INACTIVE, default ACTIVE).
      name: "modus_get_current_headcount",
      description:
        "Get current headcount by team, role, or department with filtering. Returns employee data including roles, departments, and employment status.",
      inputSchema: {
        type: "object",
        properties: {
          department: {
            type: "string",
            description: "Filter by department name (e.g., 'Sales', 'Engineering')",
          },
          role: {
            type: "string",
            description: "Filter by job role (e.g., 'Account Executive', 'SDR')",
          },
          status: {
            type: "string",
            enum: ["ACTIVE", "INACTIVE"],
            default: "ACTIVE",
            description: "Filter by employment status",
          },
        },
      },
    },
  • Tool is registered in the TOOLS array along with other tools, which is returned via ListToolsRequestSchema handler.
    const TOOLS = [
    {
      name: "modus_get_current_headcount",
      description:
        "Get current headcount by team, role, or department with filtering. Returns employee data including roles, departments, and employment status.",
      inputSchema: {
        type: "object",
        properties: {
          department: {
            type: "string",
            description: "Filter by department name (e.g., 'Sales', 'Engineering')",
          },
          role: {
            type: "string",
            description: "Filter by job role (e.g., 'Account Executive', 'SDR')",
          },
          status: {
            type: "string",
            enum: ["ACTIVE", "INACTIVE"],
            default: "ACTIVE",
            description: "Filter by employment status",
          },
        },
      },
    },
  • Handler for modus_get_current_headcount. Calls /api/employees, filters by department/role/status client-side, computes summary statistics (total, byDepartment, byRole), and returns JSON response with up to 100 employees.
    case "modus_get_current_headcount": {
      const { department, role, status = "ACTIVE" } = args || {};
      const params = new URLSearchParams();
    
      // Note: employees API uses filter-based querying, not simple params
      // For now, fetch all and filter client-side
      // TODO: Update to use proper filter syntax when documented
    
      response = await modusApi.get(`/api/employees`);
    
      // Extract employees from response
      const data = response.data || {};
      let employees = data.employees || [];
    
      // Client-side filtering
      if (department) {
        employees = employees.filter(emp => emp.department?.toLowerCase().includes(department.toLowerCase()));
      }
      if (role) {
        employees = employees.filter(emp => emp.jobRole?.toLowerCase().includes(role.toLowerCase()));
      }
      if (status) {
        employees = employees.filter(emp => emp.employmentStatus === status);
      }
    
      // Add summary statistics
      const summary = {
        total: employees.length,
        totalInAccount: data.totalCount || 0,
        byDepartment: {},
        byRole: {},
      };
    
      employees.forEach((emp) => {
        if (emp.department) {
          summary.byDepartment[emp.department] = (summary.byDepartment[emp.department] || 0) + 1;
        }
        if (emp.jobRole) {
          summary.byRole[emp.jobRole] = (summary.byRole[emp.jobRole] || 0) + 1;
        }
      });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                summary,
                employees: employees.slice(0, 100), // Limit to first 100 for readability
                note: employees.length > 100 ? `Showing first 100 of ${employees.length} employees` : null,
              },
              null,
              2
            ),
          },
        ],
      };
    }
Behavior3/5

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

With no annotations, the description carries full burden. It correctly implies a read-only behavior via 'Get', but does not explicitly state no destructive side effects or permission requirements. It is adequate but not thorough.

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

Conciseness4/5

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

The description is a single concise sentence covering the tool's purpose and returned data. It is front-loaded but lacks logical structuring. Could be split into two sentences for clarity, but overall efficient.

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?

The description mentions returning employee data including roles, departments, and status, which partially compensates for the missing output schema. However, it does not clarify whether the output is an aggregate headcount or a list of employees, which is critical given the tool name implies a count.

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

Parameters2/5

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

Schema coverage is 100% and parameter descriptions are clear. However, the description introduces 'team' as a filterable category, yet the schema only includes 'department', 'role', and 'status'. This mismatch could mislead an agent into expecting a 'team' parameter.

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 retrieves current headcount with filtering by department, role, or team. It distinguishes from siblings like modus_get_open_positions or modus_get_attrition_risks by focusing on employee counts. However, 'team' is mentioned but not a parameter, causing slight ambiguity.

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?

No guidance on when to use this tool versus alternatives. The description does not explain that this tool is for current headcount data, while siblings handle attrition, performance, or hiring timelines. An explicit when-to-use note is missing.

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