Skip to main content
Glama
Lucid-Drone-Technologies

Paylocity MCP Server

get_company_summary

Retrieve workforce summary data including headcount, department breakdowns, job titles, and reporting structures from Paylocity company records.

Instructions

Get a high-level workforce summary: total headcount, breakdown by status, department (with names), job title, and reporting relationships.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIdNoPaylocity company ID (defaults to PAYLOCITY_COMPANY_ID env var)

Implementation Reference

  • The handler for the 'get_company_summary' tool, which calculates workforce statistics (total headcount, status breakdown, department, and job title) for a given company.
    server.tool(
      "get_company_summary",
      `Get a high-level workforce summary: total headcount, breakdown by status,
    department (with names), job title, and reporting relationships.`,
      {
        companyId: companyIdParam,
      },
      async ({ companyId }) => {
        try {
          const cid = resolveCompanyId(companyId);
          const dir = await getDirectory(cid);
    
          const byStatus: Record<string, number> = {};
          const byDept: Record<string, number> = {};
          const byTitle: Record<string, number> = {};
    
          for (const e of dir) {
            const s =
              e.status === "A"
                ? "Active"
                : e.status === "T"
                  ? "Terminated"
                  : e.status;
            byStatus[s] = (byStatus[s] ?? 0) + 1;
            if (e.status === "A") {
              byDept[e.department || "Unknown"] =
                (byDept[e.department || "Unknown"] ?? 0) + 1;
              byTitle[e.jobTitle || "Unknown"] =
                (byTitle[e.jobTitle || "Unknown"] ?? 0) + 1;
            }
          }
    
          // Resolve cost center codes to names
          let costCenterNames: Record<string, string> = {};
          try {
            const codes = (await client.get(
              `/v2/companies/${cid}/codes/costcenter1`
            )) as Array<{ code: string; description: string }>;
            for (const c of codes) costCenterNames[c.code] = c.description;
          } catch {
            // codes endpoint may not be available
          }
    
          const byDeptNamed: Record<string, number> = {};
          for (const [code, count] of Object.entries(byDept)) {
            byDeptNamed[costCenterNames[code] ?? code] = count;
          }
    
          return ok({
            totalEmployees: dir.length,
            byStatus,
            byDepartment: byDeptNamed,
            byTitle,
          });
        } catch (e) {
          return err(e);
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully discloses what data is returned (headcount, departments, job titles, reporting relationships), but does not mention safety characteristics (read-only nature), authentication requirements, or performance/caching behavior. Adequate but not comprehensive behavioral disclosure.

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?

Excellent single-sentence structure that front-loads the action ('Get a high-level workforce summary') and efficiently lists the specific data components available. Zero redundancy or filler content.

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

Completeness5/5

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

Given the absence of an output schema, the description excellently compensates by detailing the exact structure and fields returned (headcount, status breakdown, department names, job titles, reporting relationships). For a simple single-parameter tool, this provides complete contextual information.

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 description coverage is 100% for the single companyId parameter, which includes default behavior (env var). The description adds no explicit parameter guidance, but with complete schema documentation, no additional parameter semantics are required. Baseline score appropriate for high schema coverage.

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 uses specific verb 'Get' and clearly defines the resource as a 'high-level workforce summary' with explicit details (headcount, department breakdowns, reporting relationships). It clearly distinguishes from siblings like get_employee (individual records) and search_employees (filtered search) by emphasizing aggregate company-wide data.

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

Usage Guidelines4/5

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

While it does not explicitly name alternative tools, the description provides clear context that this is for aggregate company-level data ('high-level workforce summary', 'total headcount'), implicitly guiding the agent to use individual employee tools (get_employee, search_employees) for non-aggregate needs. Clear context without explicit exclusions.

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/Lucid-Drone-Technologies/paylocity-mcp'

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