MCP Tool Reference
This reference covers the thirteen tools the MCP server exposes: six that read workspace data and seven that change it. Each entry lists the scope and minimum role, the parameters, a sample call and response, and the tasks the tool does not handle so you can route them to the right tool.
Read tools
Six tools read data without changing anything. They are safe to call repeatedly, though several are worth caching for the length of a conversation.
get_workspace_info
Scope: mcp:workspace:read. Minimum role: any.
Returns the workspace's departments, locations, leave types and labels in a single call. Assistants typically call it once at the start of a conversation to turn names into IDs.
Parameters:
include— optional array of"departments","locations","leaveTypes"or"labels". Omit it or pass an empty array to get all four.withWorkWeek— optional boolean. When true, each location carries its work week (working days and hours). Defaults tofalse.
If your role cannot read a section, that section comes back as { "unavailable": "Your role cannot view this in OnlyLeave" } rather than failing the whole call. Regular employees get unavailable for departments, locations and labels.
This tool does not return users, leaves or holidays. Its result is stable for the conversation, so avoid calling it on every question.
find_users
Scope: mcp:users:read. Minimum role: any.
Finds people by partial name or email, department, location or label. Visibility follows your role: regular employees see only themselves.
Parameters:
query— optional string, partial match against name or email.department— optional department name (partial match) or ID.location— optional location name (partial match) or ID.label— optional label name (partial match) or ID.status— optional"active","inactive"or"all". Defaults to"active"; use"all"to include deactivated users.limit— optional integer from 1 to 200. Defaults to 50.
This tool does not return balances, quotas or leave; use get_user_details and get_leaves for those. Call it once per person with a specific query rather than looping over a list of names.
get_user_details
Scope: mcp:users:read. Minimum role: any.
Returns one person's profile, leave balances, quotas, labels, work week and the leave types they can request. This is the tool for questions like "how many vacation days do I have left?" and for checking which leave types someone can request before calling request_leave.
Parameters:
user— optional name (partial match), email or user ID. Defaults to"me", the caller.include— optional array of"profile","balances","quotas","labels","workWeek"or"leaveTypes". Defaults to all of them.
Requestable leave types come from the location's leave policies, with their rules: isReasonRequired, isApprovalRequired, allowLeaveInPast and shortestLeaveInterval, which also indicates whether half days or hours are allowed. You can always read the policies of your own location. When your role cannot read the policies, they are derived from balances and marked "source": "from balances".
Balances and quotas are the person's own numbers. They include personal quota overrides (marked isCustom in quotas), prorating, rollover, and seniority and role entitlements. Use them to answer how many days someone gets or has left; quotas in leave policies are location defaults. On your own balances and quotas, leave types hidden from coworkers show their real names.
Any section your role is not permitted to see is flagged unavailable. For a regular employee, workWeek is flagged this way, since work weeks belong to locations and require location access.
This tool does not list leaves (use get_leaves) or change anything (use manage_user). If the user is outside your reach, the call fails with USER_NOT_FOUND.
get_leaves
Scope: mcp:leaves:read. Minimum role: any.
Lists approved, pending or denied leaves and TOIL requests in a date range, or fetches one by ID. Results match what the caller sees on the wallchart, including hidden leave types shown without their real type and reasons blanked where the app blanks them.
Parameters:
from— optional start of the range,YYYY-MM-DDor a date shortcut covering its whole period. Required unlessidis given.to— optional end of the range,YYYY-MM-DDor a date shortcut. Defaults to the end offrom.user— optional user name, email,"me"or user ID.department— optional department name or ID.location— optional location name or ID.leaveType— optional leave type name or ID.status— optional"approved","pending","denied"or"all". Defaults to"approved".kind— optional"leave","toil"or"all". Defaults to"leave".id— optional string. Returns one leave or TOIL request by ID; dates are not required then.
When your role cannot resolve a name filter (a department name for a regular employee, for instance), supply the ID instead.
Every item includes kind and id, both accepted by update_leave and decide_leave. If an ID is missing or hidden from you, the call returns NOT_FOUND.
This tool does not answer "how many days does X have left" (use get_user_details), and it does not show leave your wallchart would not show you.
get_holidays
Scope: mcp:workspace:read. Minimum role: any.
Lists public holidays for a calendar year, broken down by location. Leave out the location to receive the holidays of every location visible to you, with each row tagged by its location. Regular employees are limited to their own location's holidays.
Parameters:
year— optional integer calendar year, for example2026. Defaults to the current year in the location's timezone.location— optional location name (partial match) or ID. Omit it to include every location you can see.
This tool does not return personal leave (use get_leaves). Asking for another location as a regular employee returns FORBIDDEN.
get_workspace_settings
Scope: mcp:workspace:read. Minimum role: any.
Reads workspace configuration: leave policies per location, automations, notifications and scheduled reports. Items keep their workspace IDs, so they can be passed back to manage_leave_setup and manage_automations.
Parameters:
include— optional array of"leavePolicies","automations","notifications"or"scheduledReports". Defaults to all four.location— optional location name (partial match) or ID, limiting leave policies to that location. Regular employees and approvers cannot look locations up by name; leave it out to get the policies of your own location.automationType— optional string limiting automations to one type:blackout-period,maximum-users-away,seniority-entitlement,entitlement-by-role,probation-period,leave-duration-limitorleave-request-notice-period. Defaults to every type.
Any section your role is not permitted to see is flagged unavailable. The leave policies of your own location are always included and appear first for every role except Admin. Quotas in a policy are location defaults; an individual's own quota and balance live in get_user_details. Location admins additionally receive the policies of the locations they manage, while other locations are skipped.
This tool does not change settings; use manage_leave_setup and manage_automations for that.
Write tools
Seven tools change data. Each waits for the change to finish before answering; the three possible outcomes are described in the write answers section.
request_leave
Scope: mcp:leaves:write. Minimum role: any.
Requests leave or logs TOIL (time off in lieu) for the caller or someone else. Run mode: "preview" first to show the user the working days, balance before and after, blocking errors, automation warnings and whether approval is needed; submit only after they confirm, unless they already confirmed the exact request. Booking for someone else requires approver or admin rights over that person.
Parameters:
mode— required,"preview"or"submit". Preview checks the request without saving it; submit books it.kind— optional"leave"or"toil". Defaults to"leave";"toil"logs time off in lieu earned.user— optional name, email or user ID. Defaults to"me".leaveType— required leave type name or ID.startDate— required first day,YYYY-MM-DD.endDate— optional last day,YYYY-MM-DD. Defaults tostartDate.partDay— optional"half_day"or"hours"for single-day part-day leave.half_daywithstartTimelasts half of the person's working hours that day (4 hours when the day has none), as in the app;hoursneedsstartTimeandendTime. Omit for full days.startTime— optionalHH:MM, required withpartDay: "half_day"orpartDay: "hours".endTime— optionalHH:MM, only withpartDay: "hours". Must be afterstartTime.reason— optional reason for the leave.overrideAutomations— optional string array of automation warning codes to override. Use only after showing the warnings to the user and getting explicit agreement. Leave only.
When you book on someone else's behalf, balance problems that would block the owner surface under notes rather than blockingErrors, matching how the web app handles them; overlaps and zero-day requests still block. If submit returns AUTOMATION_OVERRIDE_REQUIRED, present every warning to the user and resubmit with overrideAutomations listing the warning codes only once they agree.
This tool does not preview TOIL (submit it directly once the user confirms), edit existing requests (use update_leave) or approve them (use decide_leave).
update_leave
Scope: mcp:leaves:write. Minimum role: any.
Edits, cancels or deletes an existing leave or TOIL request, using an ID from get_leaves. Use cancel for approved or pending leave the owner no longer needs; use delete to remove the request entirely, which is usually an admin action.
Parameters:
kind— optional"leave"or"toil". Defaults to"leave".id— required leave or TOIL request ID, as returned byget_leaves.action— required"edit","cancel"or"delete".changes— optional object, edit only, at least one field:leaveType(name or ID),startDate,endDate(YYYY-MM-DD),partDay(startHour,startMinute,endHour,endMinute;nullmakes it a full-day request),reason.reason— optional string, cancel only: why the request is cancelled.
A delete answers { "status": "completed" } with no resource.
This tool does not approve or deny (use decide_leave) or create new requests (use request_leave). An edit with no changes is rejected before anything is sent.
decide_leave
Scope: mcp:leaves:write. Minimum role: Approver.
Approves or denies a pending leave or TOIL request. With multi-level approval, an approval may leave the request open until the next approver decides; the answer then carries a message saying so.
Parameters:
kind— optional"leave"or"toil". Defaults to"leave".id— required ID of the request to decide.decision— required"approve"or"deny".reason— optional note for the requester. Recommended when denying.
This tool does not decide requests you are not an approver for (the call returns FORBIDDEN), and it does not edit the request.
manage_user
Scope: mcp:users:write. Minimum role: Location admin.
Changes one user. Pass only the fields the chosen action needs; missing fields return MISSING_FIELDS before anything is sent.
Parameters:
user— required name, email or ID of the user to change.action— required:update_profile,move_location,move_department,activate,deactivate,assign_label,remove_label,make_location_admin,remove_location_admin,set_work_week,reset_work_weekorset_quota.profile— optional object forupdate_profile:name,firstName,lastName,email,startDate,endDate,employeeId,birthday,isAdmin,isNameLocked,locale.location— optional target location name or ID formove_location.department— optional target department name or ID formove_department.label— optional label name or ID forassign_labelandremove_label.managedLocations— optional string array formake_location_admin: names or IDs of the locations the user will manage.workWeek— optional object forset_work_week:days(0 = Sunday), optionalworkHoursper day, or a multi-week schedule.quota— optional object forset_quota:leaveType(name or ID),amountandperiod("current"or"next").
This tool does not create or invite users, and it cannot change users outside your reach; location admins manage only their locations' users.
manage_organization
Scope: mcp:workspace:write. Minimum role: Location admin.
Creates, updates or deletes departments, locations, location holidays and labels, or replaces a location's work week. People and locations can be given by name, email or ID.
Parameters:
entity— required:"department","location","location_work_week","holiday"or"label".action— required"create","update"or"delete".location_work_weekonly supportsupdate.target— optional name or ID of the record to update or delete; for holidays, the holiday ID.location— optional location name or ID. Required forholidayandlocation_work_week.fields— optional object of values to set, under the key matchingentity. Required for create and update.
Fields per entity:
department:name,approvers(user plus optional levels; required on create, replaces all approvers on update),users(replaces all members),parent,isDefault,watchersToNotify,keepLeaveRequestsOpen.location:name,timezone(required on create),resetQuotas,yearStartMonth,yearStartDay,firstDayOfWeek,isDefault,users,workWeek(create only).location_work_week:days,workHours,resetUserOverrides.holiday:name,startDate(required on create),endDate,isHalfDay,transferIfFallsOnNonWorkingDay,recurring,recurringRules.label:name,color.
API v2 validation errors come back with field details. Only Admins manage labels.
This tool does not manage leave types or policies (use manage_leave_setup) or automations (use manage_automations).
manage_leave_setup
Scope: mcp:workspace:write. Minimum role: Location admin.
Creates, updates or deletes leave types, and enables, updates or disables a leave type's policy at a location (quota, rollover, approval, accrual, brought-forward expiration and TOIL settings). enable replaces the whole policy; update changes only the fields sent. The leave type and policy items get_workspace_settings returns can be passed back as fields; read-only keys are ignored.
Parameters:
entity— required"leave_type"or"leave_policy".action— required. Forleave_type:create,updateordelete. Forleave_policy:enable,updateordisable.target— optional leave type name or ID forleave_typeupdate and delete.location— optional location name or ID forleave_policy.leaveType— optional leave type name or ID forleave_policy.fields— optional object. Leave type fields:name,color,isActive,calendarStatus,awayStatus,awayStatusIcon,awayStatusMessage, and on createlocationIdsandinitialPolicy. Leave policy fields:quotaUnit,daysPerYear,hoursPerYear,maxRolloverDays,maxRolloverHours,hasUnlimitedDays,isApprovalRequired,isReasonRequired,hideLeaveType,allowLeaveInPast,negativeBalanceAllowed,negativeBroughtForwardAllowed,shortestLeaveInterval,accrual,broughtForwardExpiration,toil,resetUserOverrides.
Only Admins manage leave types. Confirm with the user before deleting a leave type or disabling a policy.
This tool does not change individual users' quotas; use manage_user with set_quota.
manage_automations
Scope: mcp:workspace:write. Minimum role: Location admin.
Creates, updates or deletes an automation (blackout periods, maximum users away, seniority entitlement, entitlement by role, probation periods, leave duration limits, notice periods), a leave notification or a scheduled report. Use get_workspace_settings to find existing items and their IDs.
Parameters:
entity— required"automation","notification"or"scheduled_report".action— required"create","update"or"delete".automationType— optional string, required whenentityisautomation:blackout-period,maximum-users-away,seniority-entitlement,entitlement-by-role,probation-period,leave-duration-limitorleave-request-notice-period.id— optional ID of the item. Required for update and delete.fields— optional object holding the API v2 request body. On update send only the fields to change. Required for create and update.
Reference fields in fields accept names or IDs and are resolved to IDs: locationIds, departmentIds, labelIds, labelId and managersReminders (user names or emails). The tool's input schema lists the main fields per automation type, notification frequency and report type.
Only Admins manage automations. An unknown automationType is rejected before anything is sent; API v2 validation errors come back with field details.
This tool does not manage leave policies (use manage_leave_setup) or webhooks.
Write answers
Every write tool answers in one of three ways.
Completed. The change is done. The result carries "status": "completed" and the updated resource under its name (leave, toil, user, holiday and so on). Deletes answer { "status": "completed" }.
Pending. The change was accepted but is still processing after about 20 seconds. The response includes an operationId and a message telling you to check the result with the matching read tool in a few seconds and not to submit again. The change is already queued, so resubmitting would duplicate it.
Failed. An error result, described below. Nothing was changed.
Errors
A tool failure is a normal tool result with isError: true. Its JSON text (and structuredContent) carries an error object with a stable code, a human-readable message, a resolution the assistant can follow, and optional details, plus a support block.
Ambiguous names return candidate matches so the assistant can retry with an ID. Error codes come from the API v2 error catalog plus a few MCP-specific ones; see Troubleshooting for the common codes.
JSON-RPC errors are reserved for protocol problems such as malformed requests or unknown methods. Authentication and plan problems are HTTP errors, not tool results. See Troubleshooting for those.
Choosing the right tool
A quick decision checklist for common requests:
- "How many days do I have left?" →
get_user_detailswithinclude: ["balances"]. Do not useget_leaves, which lists requests rather than balances. - "Who is on leave next week?" →
get_leaveswithfrom: "next_week"andstatus: "all". - "Book my vacation." →
request_leavewithmode: "preview"first, thenmode: "submit"after the user confirms. - "Cancel my approved leave." →
update_leavewithaction: "cancel"and the ID fromget_leaves. - "Approve Sarah's request." →
decide_leavewithdecision: "approve". Requires the Approver role. - "Move Marko to the Belgrade office." →
manage_userwithaction: "move_location"andlocation. Requires Location admin. - "Add a public holiday." →
manage_organizationwithentity: "holiday",action: "create"and the holiday fields. - "Change the vacation allowance for a location." →
manage_leave_setupwithentity: "leave_policy"andaction: "update". - "Set up a year-end blackout." →
manage_automationswithentity: "automation",automationType: "blackout-period"and the automation fields.
A worked example using the captured preview response: a five-day vacation request from 2026-05-04 to 2026-05-08 returns workingDays: 5, balance.remainingBefore: 12, balance.remainingAfter: 7, approvalRequired: true and canSubmit: true. The assistant should show those numbers to the user and ask for confirmation before switching to mode: "submit".
| Tool | Entity | Read or write | Minimum role |
|---|---|---|---|
| get_workspace_info | Departments, locations, leave types, labels | Read | any |
| find_users | Users | Read | any |
| get_user_details | User profile, balances, quotas | Read | any |
| get_leaves | Leaves and TOIL requests | Read | any |
| get_holidays | Public holidays | Read | any |
| get_workspace_settings | Leave policies, automations, notifications, reports | Read | any |
| request_leave | Leaves and TOIL requests | Write | any |
| update_leave | Leaves and TOIL requests | Write | any |
| decide_leave | Leaves and TOIL requests | Write | Approver |
| manage_user | Users | Write | Location admin |
| manage_organization | Departments, locations, holidays, labels | Write | Location admin |
| manage_leave_setup | Leave types and policies | Write | Location admin |
| manage_automations | Automations, notifications, reports | Write | Location admin |
Roles are the minimum stated in the source; actual visibility also depends on the caller's location and department scope.
Frequently asked questions
When should I use preview instead of submit on request_leave?
Use mode: "preview" first whenever the user has not already confirmed the exact request. Preview returns the working days, balance before and after, blocking errors, automation warnings and whether approval is needed, without saving anything. Switch to mode: "submit" only after the user confirms those numbers. If the user has already confirmed the exact request, you can submit directly.
What is the difference between a tool error and a JSON-RPC error?
A tool error is a normal tool result with isError: true and an error object containing a stable code, a message, a resolution and optional details. JSON-RPC errors are reserved for protocol problems such as malformed requests or unknown methods. Authentication and plan problems are HTTP errors, not tool results.
Why does a read tool return an unavailable section instead of failing?
Read tools that return several sections (get_workspace_info, get_user_details, get_workspace_settings) do not fail when your role cannot read one of them. That section comes back as { "unavailable": "Your role cannot view this in OnlyLeave" } while the other sections are returned normally. The assistant should tell the user that part is not visible to them rather than guess.
What should I do when a write tool returns pending?
Check the outcome with the matching read tool, for example get_leaves after request_leave. Do not resubmit: the change is already queued and resubmitting would duplicate it.
{ "include": ["departments", "locations"], "withWorkWeek": true }{
"departments": [{ "id": "team-abc", "name": "Engineering" }],
"locations": [
{
"id": "location-xyz",
"name": "Belgrade Office",
"timezone": "Europe/Belgrade",
"isDefault": true,
"workWeek": { "days": [1, 2, 3, 4, 5] }
}
]
}{ "query": "sarah", "department": "Engineering" }{
"users": [
{ "id": "usr_123", "name": "Sarah Chen", "email": "[email protected]", "locationId": "location-xyz" }
],
"totalMatches": 1,
"truncated": false
}{ "include": ["balances", "leaveTypes"] }{
"user": { "id": "usr_123", "name": "Sarah Chen", "email": "[email protected]" },
"balances": [
{ "leaveTypes": [{ "leaveTypeId": "lt-123", "leaveTypeName": "Vacation" }] }
],
"leaveTypes": {
"source": "leavePolicies",
"items": [
{
"leaveTypeId": "lt-123",
"leaveTypeName": "Vacation",
"isReasonRequired": false,
"isApprovalRequired": true,
"shortestLeaveInterval": "HALF-DAY",
"allowLeaveInPast": false
}
]
}
}{ "from": "next_week", "status": "all", "kind": "all" }{
"leaves": [
{
"kind": "leave",
"id": "leave_789",
"user": { "id": "usr_123", "name": "Sarah Chen" },
"leaveType": { "id": "lt-123", "name": "Vacation" },
"startDate": "2026-05-04",
"endDate": "2026-05-08",
"departmentId": "team-abc",
"locationId": "location-xyz"
}
],
"dateRange": { "from": "2026-05-04", "to": "2026-05-10" },
"totalMatches": 1,
"truncated": false
}{ "year": 2026, "location": "Belgrade" }{
"year": 2026,
"holidays": [
{ "name": "Statehood Day", "date": "2026-02-15", "locationId": "location-xyz", "locationName": "Belgrade Office" }
],
"totalMatches": 1
}{ "include": ["leavePolicies", "automations"], "location": "Belgrade", "automationType": "blackout-period" }{
"leavePolicies": [
{
"location": { "id": "location-xyz", "name": "Belgrade Office" },
"policies": [{ "leaveTypeId": "lt-123", "isActive": true, "isApprovalRequired": true }]
}
],
"automations": {
"blackout-period": [{ "id": "auto-1", "name": "Year-end freeze" }]
}
}{ "mode": "preview", "leaveType": "Vacation", "startDate": "2026-05-04", "endDate": "2026-05-08" }{
"canSubmit": true,
"blockingErrors": [],
"notes": [],
"automationWarnings": [],
"workingDays": 5,
"balance": { "leaveType": "Vacation", "remainingBefore": 12, "remainingAfter": 7, "unit": "days" },
"approvalRequired": true,
"reasonRequired": false
}{ "mode": "submit", "leaveType": "Vacation", "startDate": "2026-05-04", "endDate": "2026-05-08" }{
"status": "completed",
"leave": { "id": "leave_789", "leaveTypeId": "lt-123", "startDate": "2026-05-04", "endDate": "2026-05-08" }
}{ "id": "leave_789", "action": "edit", "changes": { "endDate": "2026-05-07" } }{ "status": "completed", "leave": { "id": "leave_789", "startDate": "2026-05-04", "endDate": "2026-05-07" } }{ "id": "leave_789", "decision": "deny", "reason": "Release week, please pick other dates." }{ "status": "completed", "leave": { "id": "leave_789", "startDate": "2026-05-04", "endDate": "2026-05-08" } }{ "user": "Marko", "action": "move_location", "location": "Belgrade Office" }{ "status": "completed", "user": { "id": "usr_456", "name": "Marko Petrović", "locationId": "location-xyz" } }{
"entity": "holiday",
"action": "create",
"location": "Belgrade",
"fields": { "holiday": { "name": "Labour Day", "startDate": "2026-05-01" } }
}{ "status": "completed", "holiday": { "id": "hol-1", "name": "Labour Day", "startDate": "2026-05-01" } }{
"entity": "leave_policy",
"action": "update",
"location": "Belgrade",
"leaveType": "Vacation",
"fields": { "daysPerYear": 25 }
}{ "status": "completed", "leavePolicy": { "leaveTypeId": "lt-123", "isActive": true } }{
"entity": "automation",
"action": "create",
"automationType": "blackout-period",
"fields": {
"name": "Year-end freeze",
"leaveTypeIds": ["lt-123"],
"startDate": "2026-12-20",
"endDate": "2026-12-31",
"recurring": true,
"locationIds": ["Belgrade Office"]
}
}{ "status": "completed", "automation": { "id": "auto-1", "name": "Year-end freeze" } }{
"status": "pending",
"operationId": "mcp_6f1c…",
"message": "OnlyLeave accepted the change and is still processing it. Check the result with the matching read tool in a few seconds; do not submit it again."
}{
"error": {
"code": "MISSING_FIELDS",
"message": "The move_location action needs: location.",
"resolution": "Ask the user for location and call manage_user again with them.",
"details": { "missing": ["location"] }
},
"support": {
"email": "[email protected]",
"feedback_url": "https://www.votito.com/public/ideabank/..."
}
}{ "unavailable": "Your role cannot view this in OnlyLeave" }