API & MCP
Everything a person can do on Crewdesk Leave Entitlement Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://crewdeskleaveentitlement.usefulweb.site/api/v1/calculate– run Crewdesk Leave Entitlement CalculatorGET https://crewdeskleaveentitlement.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Crewdesk Leave Entitlement Calculator
Works out how many days of annual leave someone has in a year: the full-time allowance scaled to their working days per week (also when the pattern changes during the year), pro rata for a start or end date in that year (full months like the German BUrlG, or calendar days), rounded the way you choose, plus carried-over days that lapse on a deadline unless they are used first. Add the leave taken and requested to see what is left. Shows the German statutory minimum for comparison.
| Field | Type | Default | Description |
|---|---|---|---|
year | number | 2026 | Year |
allowanceDays | number | 30 | Yearly allowance (full-time days) |
referenceDaysPerWeek | number | 5 | The allowance is for … working days a week |
startDate | text | "2026-04-15" | Start of employment (optional) |
endDate | text | — | End of employment (optional) |
workingDays | textarea | "Mon-Fri" | Working days (or lines “YYYY-MM-DD: Mon-Thu” for changes). One pattern such as Mon-Fri, or a pattern per period: first line the pattern at the start, then “2026-07-01: Mon-Thu”. |
proRata | select (months, days, none) | "months" | Part of a year counts |
rounding | select (burlg, half, up-half, none) | "burlg" | Rounding |
accrual | select (yearly, monthly) | "yearly" | Earned |
carriedIn | number | 0 | Days carried over from last year |
carryOverExpires | text | "03-31" | Carried days lapse after (MM-DD, empty = never) |
carryOverMaxDays | number | 5 | At most … days move on to next year |
leaveTaken | textarea | — | Leave taken (one range per line). 2026-03-02..2026-03-06 or a single date. Counted in working days with the holidays below. |
leavePlanned | textarea | — | Leave requested, not yet approved (one range per line) |
asOf | text | — | As of (YYYY-MM-DD, empty = end of the year) |
country | text | "DE" | Country for public holidays (optional) |
subdivision | text | "DE-BE" | State or region (optional). ISO 3166-2 code such as DE-BY (Bavaria), DE-BE (Berlin), AT-9 (Vienna), CH-ZH or US-CA. Without it only nationwide holidays count. |
extraHolidays | textarea | — | Extra holidays (YYYY-MM-DD, name per line) |
Example request
Start on 15 April, 30 days, full-time
curl -X POST https://crewdeskleaveentitlement.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"year":2026,"allowanceDays":30,"referenceDaysPerWeek":5,"startDate":"2026-04-15"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://crewdeskleaveentitlement.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
crewdesk_leave_entitlement - Local stdio connector:
node src/mcp-stdio.ts --tool=crewdesk-leave-entitlement
{
"mcpServers": {
"crewdesk-leave-entitlement": { "type": "http", "url": "https://crewdeskleaveentitlement.usefulweb.site/mcp" }
}
}