Add or change a leave type
Adds or changes a kind of time off: annual days, monthly or yearly accrual, carry-over, paid and tracked.
$0.001 a call
From your agent’s balance. A call that fails costs nothing.
An example
Everyone gets 28 days of vacation a year, and up to 5 unused days carry over.
Your agent callshr_save_leave_type$0.001 a call
The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.
{
"name": "Vacation",
"annual_days": 28,
"accrual": "yearly",
"carry_over_max": 5
}Use it when
The business sets up its leave rules, or they change.
What it does
A kind of time off, matched by name (any case), e.g. Vacation (tracked, 25 days), Sick, or Unpaid (tracked: false, paid: false). A tracked type gives everyone annual_days per leave year: all at its start (accrual yearly) or 1/12 per started month (monthly), pro-rated by the months employed for people who join or leave during it and rounded to half days, with up to carry_over_max unused days carried into the next year. An untracked type has no balance; its days are only counted. A person's own allowance is set on them (hr_save_people allowances). Archived types take no new requests.
What comes back
leave_type: its name, annual days, accrual, carry-over, paid, tracked and archived; and created. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
nameRequired | string | 1 to 60 characters. |
new_name | string | Up to 60 characters. |
annual_days | number or string | Days, in half days, e.g. 25 or 2.5. Up to 8 characters. |
accrual | string | One of: yearly,monthly. |
carry_over_max | number or string | The most unused days carried into the next leave year. Default 0. Up to 8 characters. |
paid | boolean | |
tracked | boolean | |
archived | boolean |
The call
Over MCP, call hr_save_leave_type on https://api.conecto.chat/mcp/hr. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/hr_save_leave_type \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Vacation","annual_days":28,"accrual":"yearly","carry_over_max":5}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
invalid_input400 | The name is empty, or a number is not in half days. | Send days like 28 or 2.5. |
name_taken409 | A leave type has the new name already. | Pick another name. |
More HR tools
All 23 tools- Add or change people
hr_save_peopleAdds people or changes them, up to 100 at a time, all or none: names, emails, job, department, location, manager, dates and allowances.$1.00 per person added - List people
hr_list_peoplePeople by last name, everyone who hasn't left by default, filtered by status, department, location, manager, type or words.Free* - Get a person
hr_get_personEverything about one person: details, leave balances for a year, pending and upcoming leave, documents, open tasks and direct reports.Free* - Delete a person
hr_delete_personErases a person for good with their leave, tasks and document records; their files stay in the store.Free - Read the HR settings
hr_get_settingsThe working days, hours, leave year, time zone, leave types, public holidays and checklists.Free* - Change the HR settings
hr_save_settingsSets the work calendar: working days, hours per day, leave year, time zone, and one location's public holidays for a year.$0.001 a call - Adjust a leave balance
hr_adjust_leaveAdds days to, or takes days off, one person's balance of a tracked leave type, with the reason.$0.01 a call - Request time off
hr_request_leaveAsks for time off for someone, counting working days less holidays; it waits for a decision unless approved at once.$0.01 a call
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md