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 Calculator
  • GET https://crewdeskleaveentitlement.usefulweb.site/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

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.

Inputs of Crewdesk Leave Entitlement Calculator
FieldTypeDefaultDescription
yearnumber2026Year
allowanceDaysnumber30Yearly allowance (full-time days)
referenceDaysPerWeeknumber5The allowance is for … working days a week
startDatetext"2026-04-15"Start of employment (optional)
endDatetext—End of employment (optional)
workingDaystextarea"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”.
proRataselect (months, days, none)"months"Part of a year counts
roundingselect (burlg, half, up-half, none)"burlg"Rounding
accrualselect (yearly, monthly)"yearly"Earned
carriedInnumber0Days carried over from last year
carryOverExpirestext"03-31"Carried days lapse after (MM-DD, empty = never)
carryOverMaxDaysnumber5At most … days move on to next year
leaveTakentextarea—Leave taken (one range per line). 2026-03-02..2026-03-06 or a single date. Counted in working days with the holidays below.
leavePlannedtextarea—Leave requested, not yet approved (one range per line)
asOftext—As of (YYYY-MM-DD, empty = end of the year)
countrytext"DE"Country for public holidays (optional)
subdivisiontext"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.
extraHolidaystextarea—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" }
  }
}