Skip to main content

HR Agent Tools Reference

The HR Agent's MCP server (scripts/hr-agent/mcp_server.py) exposes 11 tools backed by live HridaOne API calls. hrida-mcpo publishes them as an OpenAPI tool server, so they are available both to the HR Agent Digital Employee in chat and to Agent nodes in the Agent Builder.

Every tool also accepts two hidden arguments that the model fills in from the system prompt — you never pass them yourself:

Hidden argumentPurpose
_context_idKey for the per-user Keycloak token in Redis (hrida:kc_token:{context_id}) — the user ID in chat, the run ID in workflows
_user_emailThe signed-in user's email, used to resolve "my" records when the service account is in use (see How users see their own data)

Profile & directory​

get_my_profile​

Returns the current user's name, email, employee code, role, department, designation, and status.

Parameters: none

Example prompts: "What is my employee code?" · "Which department am I in?"

search_employees​

Searches the company directory by name, email, or department. Returns up to 10 matches with email, department, designation, employee code, and internal ID.

ParameterTypeRequiredDescription
querystringyesName, email, or department

Example prompts: "Find Priya in Finance" · "Who works in the Legal department?"

get_employee_profile​

Returns the detailed profile of one employee: email, employee code, department, designation, joining date, status, and manager.

ParameterTypeRequiredDescription
employee_idstringyesInternal numeric ID or employee code

Attendance​

get_attendance_today​

Returns today's record for an employee: status, clock-in, clock-out, total hours, break duration, and overtime.

ParameterTypeRequiredDescription
employee_idstringyesEmployee ID — resolved to the signed-in user when they ask about themselves

Example prompts: "What time did I clock in today?"

get_attendance_calendar​

Returns a monthly summary (present, absent, leave, WFH, holidays) plus daily records.

ParameterTypeRequiredDescription
employee_idstringyesEmployee ID
yearintegeryese.g. 2026
monthintegeryes1–12

Example prompts: "How many days did I work from home in September?"

get_admin_attendance_stats​

Returns the live org-wide attendance dashboard: present, absent, on leave, WFH, late, and total employees. HR managers and admins only — HridaOne rejects the call for other roles.

Parameters: none


Leave​

get_leave_balance​

Returns remaining, entitled, used, and pending days for each leave type.

ParameterTypeRequiredDescription
employee_idstringyesEmployee ID

Example prompts: "How many casual leaves do I have left?"

get_my_leaves​

Returns the current user's leave requests (up to 15), optionally filtered by status.

ParameterTypeRequiredDescription
statusstringnoPENDING, APPROVED, or REJECTED

Example prompts: "Show my pending leave requests"

apply_for_leave​

Submits a leave application, which then waits for manager approval in HridaOne.

ParameterTypeRequiredDescription
employee_idstringyesEmployee ID
leave_typestringyesEARNED, SICK, CASUAL, or COMPENSATORY
start_datestringyesYYYY-MM-DD
end_datestringyesYYYY-MM-DD
reasonstringyesReason shown to the approver

Example prompts: "Apply for casual leave next Monday and Tuesday for a family event"

Confirm before acting

apply_for_leave and create_support_ticket change data in HridaOne. Instruct the agent (in its system prompt) to confirm the details with the user before calling them.


Payroll​

get_payslip​

Returns the payslip summary for a month — gross, net, deductions, PF, and TDS. Reads already-generated payslips through HridaOne's self-service payroll endpoint; it cannot run payroll.

ParameterTypeRequiredDescription
employee_idstringyesEmployee ID
monthintegeryes1–12
yearintegeryese.g. 2026

Example prompts: "What was my net salary in August?"


Support​

create_support_ticket​

Opens an HR support ticket and returns its ID.

ParameterTypeRequiredDescription
titlestringyesTicket subject
descriptionstringyesDetails of the issue
categorystringnoTicket category (default GENERAL)

Example prompts: "Raise a ticket — my PF number is wrong on my payslip"


Who can call what​

Tools don't enforce roles themselves — HridaOne's RBAC decides what each caller sees, based on whose token reaches it:

Caller identityEffect
Employee's own Keycloak token (SSO)Employees see their own data, managers their team, HR admins everyone
Service accountAdmin-level access; the agent narrows results to the asking user by email lookup

get_admin_attendance_stats needs an HR manager or admin role.


Using the tools in Agent Builder workflows​

  1. Add hrida-mcpo as a tool server (Admin Panel → Settings → Integrations) if the HR Agent setup hasn't done so already.
  2. In an Agent node, enable the HR tools from the node's Tools panel.
  3. Give the node a system prompt such as:
You are an HR assistant. Help employees with attendance, leave, payslips, and HR tickets.
Always confirm details with the employee before applying for leave or opening a ticket.
Never reveal one employee's data to another employee.

When the run is started by a signed-in user, the run ID is passed as _context_id so the tools use that user's Keycloak token — see Architecture & Token Flow.

Hrida.ai is proprietary software of Zlabs Innovation. See the license for terms. © 2026 Zlabs Innovation.