Leave Hacker
Which days of annual leave to book around bank holidays for the most days off, and cheap flights.
使うべきか
品質と安全性
検出事項(3)
- HIGH
- INFOfind_trips 内
- INFOleave_request_message 内
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"leave-hacker": {
"url": "https://leavehacker.app/mcp"
}
}
}リモートエンドポイント
https://leavehacker.app/mcpstreamable-httpできること
ツール一覧
ツール(6)
🟢get_bank_holidays(region, year, from, to, next_working_day_off)
List the bank holidays (UK, from gov.uk) or public holidays (other countries, from Nager.Date) for a region in a year or between two dates, with weekdays and substitute days. Use it for questions like "When are the bank holidays in Scotland in 2027?". Ranges can be up to three years.
入力スキーマ
{
"type": "object",
"properties": {
"region": {
"default": "england-and-wales",
"description": "Where the person works: england-and-wales, scotland or northern-ireland for UK bank holidays (from gov.uk); IE for Ireland; an Australian state or territory as AU-NSW, AU-VIC, AU-QLD, AU-WA, AU-SA, AU-TAS, AU-ACT or AU-NT (their public holidays differ a lot); US for US federal holidays; or a two-letter ISO 3166-1 country code such as DE or FR for other countries' public holidays (from Nager.Date). Defaults to england-and-wales.",
"type": "string",
"minLength": 2,
"maxLength": 40
},
"year": {
"type": "integer",
"minimum": 2019,
"maximum": 2100,
"description": "Calendar year, e.g. 2027. Defaults to this year."
},
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Start of a date range, instead of year (yyyy-MM-dd)."
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "End of the date range, inclusive (yyyy-MM-dd)."
},
"next_working_day_off": {
"type": "boolean",
"description": "Ireland only: true if the person's employer gives the next working day off when a public holiday falls on a Saturday or Sunday (the civil service and banks do; Irish law doesn't require it, so the employer may give a day within a month, an extra day's leave or a day's pay instead). Adds those days, e.g. Mon 27 and Tue 28 Dec 2027. Default false."
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}出力スキーマ
{
"type": "object",
"properties": {
"region": {
"type": "string"
},
"regionName": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"count": {
"type": "number"
},
"holidays": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"label": {
"type": "string"
},
"name": {
"type": "string"
},
"substitute": {
"type": "boolean"
}
},
"required": [
"date",
"label",
"name",
"substitute"
],
"additionalProperties": false
}
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"type": "string"
},
"sourceUrl": {
"type": "string"
},
"licence": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"name",
"url"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"attribution": {
"type": "string",
"description": "Credit to show with the dates"
}
},
"required": [
"region",
"regionName",
"from",
"to",
"count",
"holidays",
"notes",
"source",
"sourceUrl",
"licence",
"attribution"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢best_days_to_book(region, year, from, to, holiday, ...)
Find the days of annual leave to book around each public holiday (or cluster, such as Christmas and New Year) to get the most days off in a row: "book 4 days, get 10 off" options, cheapest first, with the exact dates. Use for "Which days should I book around Easter 2027 in Scotland?". Filter by holiday name (Easter, Christmas, Early May, Spring, Summer, St Patrick...). Past days are skipped.
入力スキーマ
{
"type": "object",
"properties": {
"region": {
"default": "england-and-wales",
"description": "Where the person works: england-and-wales, scotland or northern-ireland for UK bank holidays (from gov.uk); IE for Ireland; an Australian state or territory as AU-NSW, AU-VIC, AU-QLD, AU-WA, AU-SA, AU-TAS, AU-ACT or AU-NT (their public holidays differ a lot); US for US federal holidays; or a two-letter ISO 3166-1 country code such as DE or FR for other countries' public holidays (from Nager.Date). Defaults to england-and-wales.",
"type": "string",
"minLength": 2,
"maxLength": 40
},
"year": {
"type": "integer",
"minimum": 2019,
"maximum": 2100,
"description": "Calendar year, e.g. 2027. Defaults to this year."
},
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Start of a date range, instead of year (yyyy-MM-dd)."
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "End of the date range, inclusive (yyyy-MM-dd)."
},
"holiday": {
"description": "Only holidays whose name contains this, e.g. \"Easter\", \"Christmas\", \"May\".",
"type": "string",
"maxLength": 60
},
"max_leave_days": {
"default": 9,
"description": "Most days of leave for one break. Default 9.",
"type": "integer",
"minimum": 1,
"maximum": 15
},
"workdays": {
"minItems": 1,
"maxItems": 7,
"type": "array",
"items": {
"type": "string",
"enum": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
]
},
"description": "Days the person works, e.g. [\"mon\",\"tue\",\"wed\",\"thu\"] for a four-day week. Defaults to Monday to Friday."
},
"us_holidays": {
"default": "federal",
"description": "US only: which holidays the person's employer gives. Private employers choose: common = the usual six (New Year's Day, Memorial Day, Independence Day, Labor Day, Thanksgiving, Christmas); federal = all 11 federal holidays; custom = the ones in us_holiday_ids. Default here: federal, to show every option.",
"type": "string",
"enum": [
"common",
"federal",
"custom"
]
},
"us_holiday_ids": {
"maxItems": 12,
"type": "array",
"items": {
"type": "string",
"enum": [
"new-years-day",
"mlk-day",
"washingtons-birthday",
"memorial-day",
"juneteenth",
"independence-day",
"labor-day",
"columbus-day",
"veterans-day",
"thanksgiving",
"day-after-thanksgiving",
"christmas-day"
]
},
"description": "US only, with us_holidays: custom. Any of: new-years-day, mlk-day, washingtons-birthday, memorial-day, juneteenth, independence-day, labor-day, columbus-day, veterans-day, thanksgiving, day-after-thanksgiving, christmas-day (day-after-thanksgiving isn't federal, but many employers give it)."
},
"next_working_day_off": {
"type": "boolean",
"description": "Ireland only: true if the person's employer gives the next working day off when a public holiday falls on a Saturday or Sunday (the civil service and banks do; Irish law doesn't require it, so the employer may give a day within a month, an extra day's leave or a day's pay instead). Adds those days, e.g. Mon 27 and Tue 28 Dec 2027. Default false."
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}出力スキーマ
{
"type": "object",
"properties": {
"region": {
"type": "string"
},
"regionName": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"maxLeaveDays": {
"type": "number"
},
"workdays": {
"type": "array",
"items": {
"type": "string"
}
},
"opportunities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"holidays": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"label": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"date",
"label",
"name"
],
"additionalProperties": false
}
},
"best": {
"anyOf": [
{
"type": "object",
"properties": {
"start": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"end": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"daysOff": {
"type": "number",
"description": "Days off in a row, weekends and holidays included"
},
"leaveDays": {
"type": "number",
"description": "Days of leave to book"
},
"daysOffPerLeaveDay": {
"description": "Left out when the break needs no leave",
"type": "number"
},
"datesToBook": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
}
},
"holidays": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"label": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"date",
"label",
"name"
],
"additionalProperties": false
}
}
},
"required": [
"start",
"end",
"daysOff",
"leaveDays",
"datesToBook",
"holidays"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"end": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"daysOff": {
"type": "number",
"description": "Days off in a row, weekends and holidays included"
},
"leaveDays": {
"type": "number",
"description": "Days of leave to book"
},
"daysOffPerLeaveDay": {
"description": "Left out when the break needs no leave",
"type": "number"
},
"datesToBook": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
}
},
"holidays": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"label": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"date",
"label",
"name"
],
"additionalProperties": false
}
}
},
"required": [
"start",
"end",
"daysOff",
"leaveDays",
"datesToBook",
"holidays"
],
"additionalProperties": false
}
}
},
"required": [
"name",
"holidays",
"best",
"options"
],
"additionalProperties": false
}
},
"assumptions": {
"type": "string"
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"type": "string"
},
"sourceUrl": {
"type": "string"
},
"licence": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"name",
"url"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"attribution": {
"type": "string",
"description": "Credit to show with the dates"
}
},
"required": [
"region",
"regionName",
"from",
"to",
"maxLeaveDays",
"workdays",
"opportunities",
"assumptions",
"notes",
"source",
"sourceUrl",
"licence",
"attribution"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢plan_leave_year(region, allowance, us_holidays, us_holiday_ids, next_working_day_off, ...)
Plan a whole leave year: the set of breaks that turns the person's annual leave allowance into the most days off, using every bank holiday, with the dates to book for each break and the totals. Handles any leave year start date, part-time working days, three plan styles and school holidays (parents: breaks only in school holidays; school staff: the holidays themselves). Use for "Plan my 28 days of leave for 2027, I have kids at school".
入力スキーマ
{
"type": "object",
"properties": {
"region": {
"default": "england-and-wales",
"description": "Where the person works: england-and-wales, scotland or northern-ireland for UK bank holidays (from gov.uk); IE for Ireland; an Australian state or territory as AU-NSW, AU-VIC, AU-QLD, AU-WA, AU-SA, AU-TAS, AU-ACT or AU-NT (their public holidays differ a lot); US for US federal holidays; or a two-letter ISO 3166-1 country code such as DE or FR for other countries' public holidays (from Nager.Date). Defaults to england-and-wales.",
"type": "string",
"minLength": 2,
"maxLength": 40
},
"allowance": {
"description": "Days of annual leave (PTO in the US) a year, not counting public holidays. Defaults to the usual for the region: 25 in the UK, 20 in Ireland and Australia (the legal minimum for full-time work), 15 in the US.",
"type": "integer",
"minimum": 0,
"maximum": 60
},
"us_holidays": {
"default": "common",
"description": "US only: which holidays the person's employer gives. Private employers choose: common = the usual six (New Year's Day, Memorial Day, Independence Day, Labor Day, Thanksgiving, Christmas); federal = all 11 federal holidays; custom = the ones in us_holiday_ids. Default here: common.",
"type": "string",
"enum": [
"common",
"federal",
"custom"
]
},
"us_holiday_ids": {
"maxItems": 12,
"type": "array",
"items": {
"type": "string",
"enum": [
"new-years-day",
"mlk-day",
"washingtons-birthday",
"memorial-day",
"juneteenth",
"independence-day",
"labor-day",
"columbus-day",
"veterans-day",
"thanksgiving",
"day-after-thanksgiving",
"christmas-day"
]
},
"description": "US only, with us_holidays: custom. Any of: new-years-day, mlk-day, washingtons-birthday, memorial-day, juneteenth, independence-day, labor-day, columbus-day, veterans-day, thanksgiving, day-after-thanksgiving, christmas-day (day-after-thanksgiving isn't federal, but many employers give it)."
},
"next_working_day_off": {
"type": "boolean",
"description": "Ireland only: true if the person's employer gives the next working day off when a public holiday falls on a Saturday or Sunday (the civil service and banks do; Irish law doesn't require it, so the employer may give a day within a month, an extra day's leave or a day's pay instead). Adds those days, e.g. Mon 27 and Tue 28 Dec 2027. Default false."
},
"days_used": {
"default": 0,
"description": "Days of this leave year's allowance already taken or booked. Default 0.",
"type": "integer",
"minimum": 0,
"maximum": 60
},
"leave_year_start_month": {
"default": 1,
"description": "Month the leave year starts, 1–12 (1 = January, 4 = April). Default 1.",
"type": "integer",
"minimum": 1,
"maximum": 12
},
"leave_year_start_day": {
"default": 1,
"description": "Day of the month the leave year starts. Default 1.",
"type": "integer",
"minimum": 1,
"maximum": 31
},
"workdays": {
"minItems": 1,
"maxItems": 7,
"type": "array",
"items": {
"type": "string",
"enum": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
]
},
"description": "Days the person works, e.g. [\"mon\",\"tue\",\"wed\",\"thu\"] for a four-day week. Defaults to Monday to Friday."
},
"style": {
"default": "mix",
"description": "mix: two proper holidays of 9+ days, the rest long weekends (default). longWeekends: as many 3–5 day weekends as possible. bigTrips: fewer trips of 9+ days.",
"type": "string",
"enum": [
"mix",
"longWeekends",
"bigTrips"
]
},
"school": {
"default": "none",
"description": "none (default); parent: children at school, so breaks only in typical school holidays; staff: works in a school, so the school holidays are the breaks. UK only.",
"type": "string",
"enum": [
"none",
"parent",
"staff"
]
},
"year": {
"description": "Which leave year: current or next. Defaults to current, or next when under 90 days are left.",
"type": "string",
"enum": [
"current",
"next"
]
},
"leave_year_starting": {
"description": "Instead of year: the calendar year the leave year starts in, e.g. 2027 for January–December 2027 or April 2027–March 2028.",
"type": "integer",
"minimum": 2019,
"maximum": 2100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}出力スキーマ
{
"type": "object",
"properties": {
"region": {
"type": "string"
},
"regionName": {
"type": "string"
},
"leaveYear": {
"type": "object",
"properties": {
"start": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"end": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
}
},
"required": [
"start",
"end"
],
"additionalProperties": false
},
"plannedFrom": {
"type": "string"
},
"allowance": {
"type": "number"
},
"daysUsed": {
"type": "number"
},
"budget": {
"type": "number"
},
"style": {
"type": "string"
},
"school": {
"type": "string"
},
"workdays": {
"type": "array",
"items": {
"type": "string"
}
},
"totals": {
"type": "object",
"properties": {
"breaks": {
"type": "number"
},
"daysOff": {
"type": "number"
},
"leaveUsed": {
"type": "number"
},
"leftover": {
"type": "number"
}
},
"required": [
"breaks",
"daysOff",
"leaveUsed",
"leftover"
],
"additionalProperties": false
},
"breaks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"end": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"daysOff": {
"type": "number",
"description": "Days off in a row, weekends and holidays included"
},
"leaveDays": {
"type": "number",
"description": "Days of leave to book"
},
"daysOffPerLeaveDay": {
"description": "Left out when the break needs no leave",
"type": "number"
},
"datesToBook": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
}
},
"holidays": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"label": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"date",
"label",
"name"
],
"additionalProperties": false
}
}
},
"required": [
"start",
"end",
"daysOff",
"leaveDays",
"datesToBook",
"holidays"
],
"additionalProperties": false
}
},
"bankHolidays": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"label": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"date",
"label",
"name"
],
"additionalProperties": false
}
},
"schoolHolidays": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"start": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"end": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"typical": {
"type": "boolean",
"const": true
}
},
"required": [
"name",
"start",
"end",
"typical"
],
"additionalProperties": false
}
},
"assumptions": {
"type": "string"
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"type": "string"
},
"sourceUrl": {
"type": "string"
},
"licence": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"name",
"url"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"attribution": {
"type": "string",
"description": "Credit to show with the dates"
}
},
"required": [
"region",
"regionName",
"leaveYear",
"plannedFrom",
"allowance",
"daysUsed",
"budget",
"style",
"school",
"workdays",
"totals",
"breaks",
"bankHolidays",
"schoolHolidays",
"assumptions",
"notes",
"source",
"sourceUrl",
"licence",
"attribution"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢get_school_holidays(region, year)
Typical state-school holiday dates for a UK nation in a year (half terms, Easter, summer, Christmas). These are the usual pattern, NOT official dates: councils and schools set their own, so always tell the person to check their school's term dates.
入力スキーマ
{
"type": "object",
"properties": {
"region": {
"default": "england-and-wales",
"description": "UK nation: england-and-wales, scotland or northern-ireland.",
"type": "string",
"enum": [
"england-and-wales",
"scotland",
"northern-ireland"
]
},
"year": {
"type": "integer",
"minimum": 2019,
"maximum": 2100,
"description": "Calendar year, e.g. 2027. Defaults to this year."
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}出力スキーマ
{
"type": "object",
"properties": {
"region": {
"type": "string"
},
"regionName": {
"type": "string"
},
"year": {
"type": "number"
},
"typical": {
"type": "boolean",
"const": true
},
"schoolHolidays": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"start": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"end": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"days": {
"type": "number"
}
},
"required": [
"name",
"start",
"end",
"days"
],
"additionalProperties": false
}
},
"caveat": {
"type": "string"
}
},
"required": [
"region",
"regionName",
"year",
"typical",
"schoolHolidays",
"caveat"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢find_trips(origin, depart, return, limit)
Find the cheapest return flights from a departure airport that fit a break, one per destination, cheapest first, with booking links. Prices are cached airline fares in the departure country's currency (GBP, EUR, AUD or USD) and can change; if the result says sample, they are example prices only. Links go through leavehacker.app/go and are affiliate links: Leave Hacker may earn a commission if you book, at no extra cost to you. Say so when you share them. Use for "Find cheap flights from Manchester that fit the May bank holiday weekend" (work out the break's dates with best_days_to_book first).
入力スキーマ
{
"type": "object",
"properties": {
"origin": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Departure airport or city IATA code, e.g. MAN (Manchester), LGW (Gatwick), EDI (Edinburgh), BHX, LON (all London airports)."
},
"depart": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Outbound date, the first day of the break (yyyy-MM-dd)."
},
"return": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Return date, the last day of the break (yyyy-MM-dd)."
},
"limit": {
"default": 10,
"description": "How many destinations to return, up to 20. Default 10.",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"required": [
"origin",
"depart",
"return"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}出力スキーマ
{
"type": "object",
"properties": {
"origin": {
"type": "string"
},
"depart": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"return": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"currency": {
"type": "string",
"description": "ISO 4217: GBP from the UK, EUR from Ireland, AUD from Australia, USD from the US"
},
"sample": {
"type": "boolean",
"description": "True: example prices, not real offers"
},
"priceNote": {
"type": "string"
},
"fares": {
"type": "array",
"items": {
"type": "object",
"properties": {
"destination": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"price": {
"type": "number",
"description": "Per person, return, in currency"
},
"airline": {
"description": "IATA airline code, when known",
"type": "string"
},
"transfers": {
"type": "number"
},
"departAt": {
"type": "string"
},
"returnAt": {
"type": "string"
},
"fitsDates": {
"type": "boolean",
"description": "False: a from-price on other dates that month; the link searches the break's dates"
},
"url": {
"type": "string",
"description": "Affiliate booking link"
}
},
"required": [
"destination",
"city",
"country",
"price",
"transfers",
"departAt",
"returnAt",
"fitsDates",
"url"
],
"additionalProperties": false
}
},
"searchAllUrl": {
"type": "string"
},
"affiliate": {
"type": "boolean",
"const": true
},
"disclosure": {
"type": "string"
}
},
"required": [
"origin",
"depart",
"return",
"currency",
"sample",
"priceNote",
"fares",
"searchAllUrl",
"affiliate",
"disclosure"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢leave_request_message(dates_to_book, break_start, break_end, region)
Write the short, polite message asking a manager for the leave days of a break, in the same words as the Leave Hacker app. Pass the dates to book; the break's first and last day are worked out from the weekends (and bank holidays, if you pass region) either side unless you pass them.
入力スキーマ
{
"type": "object",
"properties": {
"dates_to_book": {
"minItems": 1,
"maxItems": 60,
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "A day of leave (yyyy-MM-dd)."
},
"description": "The working days to book as leave (yyyy-MM-dd)."
},
"break_start": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First day off, if known (yyyy-MM-dd)."
},
"break_end": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last day off, if known (yyyy-MM-dd)."
},
"region": {
"description": "Optional, to count bank holidays next to the dates: england-and-wales, scotland or northern-ireland for UK bank holidays (from gov.uk); IE for Ireland; an Australian state or territory as AU-NSW, AU-VIC, AU-QLD, AU-WA, AU-SA, AU-TAS, AU-ACT or AU-NT (their public holidays differ a lot); US for US federal holidays; or a two-letter ISO 3166-1 country code such as DE or FR for other countries' public holidays (from Nager.Date).",
"type": "string",
"minLength": 2,
"maxLength": 40
}
},
"required": [
"dates_to_book"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}出力スキーマ
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"datesToBook": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
}
},
"break": {
"type": "object",
"properties": {
"start": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"end": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "yyyy-MM-dd"
},
"label": {
"type": "string",
"description": "e.g. \"Fri 26 Mar 2027\""
}
},
"required": [
"date",
"label"
],
"additionalProperties": false
},
"daysOff": {
"type": "number"
},
"leaveDays": {
"type": "number"
}
},
"required": [
"start",
"end",
"daysOff",
"leaveDays"
],
"additionalProperties": false
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"message",
"datesToBook",
"break",
"notes"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}コミュニティ
エビデンス