Approve, decline or cancel leave
Approves or declines a pending leave request, or cancels one that is pending or approved.
$0.01 a call
From your agent’s balance. A call that fails costs nothing.
An example
Lena says yes to Tom's Christmas leave.
Your agent callshr_decide_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.
{
"request_id": 4142,
"decision": "approve",
"note": "Enjoy the holidays!"
}Use it when
A manager decided, or plans changed.
What it does
Decide on a leave request: approve or decline one that is pending, or cancel one that is pending or approved (approved days go back to the balance). Declined and cancelled requests stay as they are; ask again with hr_request_leave. Approving checks the balance again; allow_negative: true lets it go below 0. Returns the request and the balance after it.
What comes back
request: the request with its new status; balances: the balance after it. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
request_idRequired | integer | At least 1. |
decisionRequired | string | One of: approve,decline,cancel. |
note | string | Up to 1,000 characters. |
allow_negative | boolean | Default: false. |
The call
Over MCP, call hr_decide_leave on https://api.conecto.chat/mcp/hr. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/hr_decide_leave \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"request_id":4142,"decision":"approve","note":"Enjoy the holidays!"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | No leave request has that request_id. | Find it with hr_list_leave. |
already_approved409 | The request is approved already. | Cancel it instead to undo it. |
already_declined409 | The request is declined. | Ask again with hr_request_leave. |
already_cancelled409 | The request is cancelled. | Ask again with hr_request_leave. |
outside_employment409 | The dates are outside the person's employment now. | Cancel the request. |
not_enough_days409 | The balance (after pending requests) cannot take the days. | Ask for fewer days, or pass allow_negative: true if the owner agrees. |
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 - 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
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md