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 argument | Purpose |
|---|---|
_context_id | Key for the per-user Keycloak token in Redis (hrida:kc_token:{context_id}) — the user ID in chat, the run ID in workflows |
_user_email | The 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Name, 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_id | string | yes | Internal 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_id | string | yes | Employee 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_id | string | yes | Employee ID |
year | integer | yes | e.g. 2026 |
month | integer | yes | 1–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.
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_id | string | yes | Employee 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | no | PENDING, 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_id | string | yes | Employee ID |
leave_type | string | yes | EARNED, SICK, CASUAL, or COMPENSATORY |
start_date | string | yes | YYYY-MM-DD |
end_date | string | yes | YYYY-MM-DD |
reason | string | yes | Reason shown to the approver |
Example prompts: "Apply for casual leave next Monday and Tuesday for a family event"
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_id | string | yes | Employee ID |
month | integer | yes | 1–12 |
year | integer | yes | e.g. 2026 |
Example prompts: "What was my net salary in August?"
Support
create_support_ticket
Opens an HR support ticket and returns its ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | Ticket subject |
description | string | yes | Details of the issue |
category | string | no | Ticket 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 identity | Effect |
|---|---|
| Employee's own Keycloak token (SSO) | Employees see their own data, managers their team, HR admins everyone |
| Service account | Admin-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
- Add hrida-mcpo as a tool server (Admin Panel → Settings → Integrations) if the HR Agent setup hasn't done so already.
- In an Agent node, enable the HR tools from the node's Tools panel.
- 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.