Adjust a leave balance
Adds days to, or takes days off, one person's balance of a tracked leave type, with the reason.
$0.01 a call
From your agent’s balance. A call that fails costs nothing.
An example
Tom worked the Saturday market. Give him a day in lieu.
Your agent callshr_adjust_leave$0.01 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.
{
"person": "tom.okafor@hansenvoss.example",
"leave_type": "Vacation",
"days": 1,
"reason": "Day in lieu for the Saturday market, October 10"
}Use it when
Leave taken before the business kept it here, a day in lieu, or a correction.
- For time off someone is taking, use
hr_request_leave.
What it does
Add days to, or take days off, one person's balance of a tracked leave type in one leave year, with the reason: what they had already used or carried over when you started keeping their leave here, a day in lieu, a correction. Conecto counts from the leave year a person was added, so earlier history comes in this way. Returns the new balance.
What comes back
The person, and their balance of that leave type afterwards, with the adjustment in it. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
personRequired | integer or string | The person_id, or their work email. 1 to 254 characters, at least 1. |
leave_typeRequired | string | A leave type by name, e.g. "Vacation". 1 to 60 characters. |
daysRequired | number or string | Positive adds, negative takes off, in half days, e.g. -12 or 1.5. Up to 8 characters. |
reasonRequired | string | 1 to 300 characters. |
year | integer | A leave year, named by the year it starts in. Default: the current one. 2,000 to 2,100. |
The call
Over MCP, call hr_adjust_leave on https://api.conecto.chat/mcp/hr. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/hr_adjust_leave \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"person":"tom.okafor@hansenvoss.example","leave_type":"Vacation","days":1,"reason":"Day in lieu for the Saturday market, October 10"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | No person of the business has that person_id or work email. | Find them with hr_list_people. |
not_found404 | No leave type has that name. | Call hr_get_settings, or add it with hr_save_leave_type. |
invalid_input400 | The days are 0 or not in half days, or there is no reason. | Send days like 1 or -2.5 and a reason. |
not_tracked409 | The leave type is not tracked, so it has no balance. | Adjust a tracked type. |
archived409 | The leave type is archived. | Use a type that is in use. |
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 - Add or change a leave type
hr_save_leave_typeAdds or changes a kind of time off: annual days, monthly or yearly accrual, carry-over, paid and tracked.$0.001 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