Skip to main content
Glama
Lucid-Drone-Technologies

Paylocity MCP Server

add_earnings

Add one-time or recurring earnings like bonuses, commissions, or overtime to employee payroll records in Paylocity. Specify earning codes, amounts, dates, and cost centers for accurate compensation management.

Instructions

Add a one-time or recurring earning to an employee (bonus, commission, stipend, overtime, etc.). Use get_company_codes or check existing earnings for valid earning codes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIdNoPaylocity company ID (defaults to PAYLOCITY_COMPANY_ID env var)
employeeIdYesPaylocity employee ID
earningCodeYesEarning code (e.g. BONUS, COMM, OT — company-specific)
amountNoDollar amount
rateNoRate per hour/unit
hoursOrUnitsNoNumber of hours or units
startDateYesStart date YYYY-MM-DD
endDateNoEnd date YYYY-MM-DD (omit for one-time)
costCenter1No
costCenter2No
costCenter3No

Implementation Reference

  • The handler logic for 'add_earnings' tool, which constructs the payload and makes a PUT request to the Paylocity API.
    async ({
      companyId,
      employeeId,
      earningCode,
      amount,
      rate,
      hoursOrUnits,
      startDate,
      endDate,
      costCenter1,
      costCenter2,
      costCenter3,
    }) => {
      try {
        const cid = resolveCompanyId(companyId);
    
        const payload: Record<string, any> = {
          earningCode,
          startDate,
        };
        if (amount !== undefined) payload.amount = amount;
        if (rate !== undefined) payload.rate = rate;
        if (hoursOrUnits !== undefined) payload.hoursOrUnits = hoursOrUnits;
        if (endDate) payload.endDate = endDate;
        if (costCenter1) payload.costCenter1 = costCenter1;
        if (costCenter2) payload.costCenter2 = costCenter2;
        if (costCenter3) payload.costCenter3 = costCenter3;
    
        const result = await client.put(
          `/v2/companies/${cid}/employees/${employeeId}/earnings`,
          payload
        );
    
        return ok({ success: true, result });
      } catch (e) {
        return err(e);
  • src/server.ts:537-555 (registration)
    The registration and Zod schema definition for the 'add_earnings' tool.
    server.tool(
      "add_earnings",
      `Add a one-time or recurring earning to an employee (bonus, commission, stipend,
    overtime, etc.). Use get_company_codes or check existing earnings for valid earning codes.`,
      {
        companyId: companyIdParam,
        employeeId: z.string().describe("Paylocity employee ID"),
        earningCode: z
          .string()
          .describe("Earning code (e.g. BONUS, COMM, OT — company-specific)"),
        amount: z.number().optional().describe("Dollar amount"),
        rate: z.number().optional().describe("Rate per hour/unit"),
        hoursOrUnits: z.number().optional().describe("Number of hours or units"),
        startDate: z.string().describe("Start date YYYY-MM-DD"),
        endDate: z.string().optional().describe("End date YYYY-MM-DD (omit for one-time)"),
        costCenter1: z.string().optional(),
        costCenter2: z.string().optional(),
        costCenter3: z.string().optional(),
      },
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It clarifies the temporal behavior (one-time vs recurring) and prerequisites, but omits safety details like whether this creates permanent payroll records, potential validation failures, or idempotency characteristics.

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 sentences with zero waste: the first establishes purpose with examples, the second provides actionable prerequisite guidance. Information is front-loaded and every word serves the agent's selection decision.

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 11 parameters, no output schema, and no annotations, the description meets minimum viability for tool selection but leaves gaps. It adequately covers the core earning addition logic but provides no semantics for cost center fields and does not describe success behaviors or return values.

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

Parameters4/5

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

Schema coverage is 73%, establishing a baseline of 3. The description adds significant value by providing concrete examples for 'earningCode' (BONUS, COMM, OT) and framing the date parameters as 'one-time or recurring.' However, it fails to address the three costCenter parameters which lack schema descriptions.

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 action ('Add') and resource ('earning') with specific examples (bonus, commission, stipend, overtime). It distinguishes from sibling 'add_employee' by specifying the target is an earning added 'to an employee' rather than the employee record itself.

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?

The description provides explicit prerequisite guidance by referencing 'get_company_codes' to obtain valid earning codes before invocation. While it doesn't explicitly state when NOT to use the tool, it effectively guides the agent toward necessary preparatory steps.

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