Skip to main content
Glama

fetch_employee_details

Retrieve specific employee information from Paylocity by providing company and employee IDs. This tool accesses employee data, earnings, taxes, and pay statements through the MCP server.

Instructions

Fetch details for a specific employee.

Args: company_id: Optional company ID (string or integer). If not provided, uses the first company ID from configuration. employee_id: Employee ID (string or integer) to get details for.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
company_idNo
employee_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'fetch_employee_details' tool. It is registered via @mcp.tool() decorator, validates input, formats IDs, and delegates to PaylocityClient.get_employee_details() to fetch the data.
    @mcp.tool()
    def fetch_employee_details(company_id: Optional[Union[str, int]] = None, employee_id: Union[str, int] = None) -> Dict[str, Any]:
        """
        Fetch details for a specific employee.
        
        Args:
            company_id: Optional company ID (string or integer). If not provided, uses the first company ID from configuration.
            employee_id: Employee ID (string or integer) to get details for.
        """
        if employee_id is None:
            raise ValueError("employee_id is required")
            
        company_id_str = str(company_id) if company_id is not None else company_ids[0]
        employee_id_str = str(employee_id)
        return client.get_employee_details(company_id_str, employee_id_str)
  • Supporting method in PaylocityClient class that constructs the API endpoint and makes the authenticated HTTP request to retrieve employee details from Paylocity API.
    def get_employee_details(self, company_id, employee_id):
        """Get detailed employee information with automatic token management"""
        endpoint = "/api/v2/companies/{}/{}".format(company_id, employee_id)
        return self._make_request("GET", endpoint).json()
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it 'fetches details' without disclosing behavioral traits like authentication requirements, rate limits, error conditions, or what 'details' specifically includes. It mentions default behavior for company_id but lacks broader operational context.

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?

Extremely concise with zero wasted words. The purpose is stated in one clear sentence, followed by a structured parameter explanation. Every sentence earns its place by providing essential 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 2 parameters with 0% schema coverage and an output schema exists, the description adequately covers parameter semantics but lacks behavioral context for a read operation. The output schema reduces need to explain return values, but more operational guidance would help.

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 description coverage is 0%, so the description must compensate. It provides meaningful context for both parameters: company_id is optional with default behavior explained, and employee_id is required for targeting. This adds substantial value beyond the bare schema types.

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 verb 'fetch' and resource 'details for a specific employee', making the purpose unambiguous. It distinguishes from siblings like 'fetch_employees' (plural) and 'fetch_employee_earnings' (specific data), but doesn't explicitly contrast them in the description text.

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 is provided about when to use this tool versus alternatives like 'fetch_employees' (list) or 'fetch_employee_paystatement_details' (specific financial data). The description only states what it does, not when it's appropriate relative to other tools.

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/mz462/mcpPaylocity'

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