tilwhen date engine
Deterministic date arithmetic with auditable receipts: business days, due dates, holidays.
Sollte ich dies verwenden
Qualität und Sicherheit
Befunde (1)
- LOWin invoice_due
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"tilwhen": {
"url": "https://mcp.tilwhen.com/mcp"
}
}
}Remote-Endpunkte
https://mcp.tilwhen.com/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (9)
🟢parse_date_query(q, tz, locale)
Parses queries like "90 business days from today in uganda" into a normalized operation, answers it, and returns the auditable receipt. Ambiguous dates (03/04/2027) return needsClarification instead of a guess.
Eingabe-Schema
{
"type": "object",
"properties": {
"q": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The date question in plain language. Pass the user's wording rather than a date you computed."
},
"tz": {
"type": "string",
"maxLength": 64,
"default": "UTC",
"description": "IANA timezone that defines \"today\" (e.g. Africa/Kampala). Default UTC."
},
"locale": {
"type": "string",
"enum": [
"mdy",
"dmy"
],
"description": "Resolves ambiguous slash dates; omit to receive clarification choices"
}
},
"required": [
"q"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"parsed": {
"anyOf": [
{
"type": "object",
"properties": {},
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Normalized operation, or null when the query could not be understood confidently"
},
"confidence": {
"type": "number",
"description": "1.0 is a clean grammar hit; below 0.5 the query is refused rather than guessed"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"description": "Machine-readable notes, e.g. unsupported_unit or time_ignored"
},
"needsClarification": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Present when the query is genuinely ambiguous (e.g. 03/04/2027); offers explicit choices instead of a guess"
},
"canonicalUrl": {
"type": [
"string",
"null"
],
"description": "tilwhen page that answers this query, to cite; null when no page covers it"
},
"answer": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "The calculated answer, absent when parsed is null"
},
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt, absent when parsed is null"
}
},
"required": [
"parsed",
"confidence",
"warnings"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢add_days(date, days, tz)
The date N whole calendar days after a date (exclusive counting: the start date is day 0). Omit date for today in tz. For working days use business_days; for the gap between two dates use days_between.
Eingabe-Schema
{
"type": "object",
"properties": {
"date": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)",
"default": "today"
},
"days": {
"type": "integer",
"minimum": -100000,
"maximum": 100000,
"description": "Whole calendar days to add. Negative counts backwards."
},
"tz": {
"type": "string",
"maxLength": 64,
"default": "UTC",
"description": "IANA timezone that defines \"today\" (e.g. Africa/Kampala). Default UTC."
}
},
"required": [
"days"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"answer": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "The calculated answer (kind-discriminated)"
},
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID"
}
},
"required": [
"answer",
"receipt"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢subtract_days(date, days, tz)
The date N whole calendar days before a date (exclusive counting: the start date is day 0). Omit date for today in tz. For working days use business_days; for the gap between two dates use days_between.
Eingabe-Schema
{
"type": "object",
"properties": {
"date": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)",
"default": "today"
},
"days": {
"type": "integer",
"minimum": -100000,
"maximum": 100000,
"description": "Whole calendar days to subtract. Negative counts forwards."
},
"tz": {
"type": "string",
"maxLength": 64,
"default": "UTC",
"description": "IANA timezone that defines \"today\" (e.g. Africa/Kampala). Default UTC."
}
},
"required": [
"days"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"answer": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "The calculated answer (kind-discriminated)"
},
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID"
}
},
"required": [
"answer",
"receipt"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢days_between(from, to, tz)
Signed whole calendar days from the from date to the to date, midnight to midnight in tz: positive when to is later, negative when it is earlier. Endpoints are exclusive, so this is the gap and consecutive dates are 1 apart. Either date may be "today", resolved in tz. For working days between two dates use business_days; to move a date by N days use add_days or subtract_days.
Eingabe-Schema
{
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"to": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"tz": {
"type": "string",
"maxLength": 64,
"default": "UTC",
"description": "IANA timezone that defines \"today\" (e.g. Africa/Kampala). Default UTC."
}
},
"required": [
"from",
"to"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"answer": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "The calculated answer (kind-discriminated)"
},
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID"
}
},
"required": [
"answer",
"receipt"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢business_days(from, to, date, days, jurisdiction, ...)
Span mode (from+to): business days between two dates, exclusive of the start day, inclusive of the end day. Add mode (days, optional date): the date N business days away. Passing from or to selects span mode and needs both; days and date are then ignored, so add mode takes its start date in date, not from. Optional holiday jurisdiction or custom calendar, and a selectable working week. For calendar days use add_days, subtract_days or days_between.
Eingabe-Schema
{
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"to": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"date": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"days": {
"type": "integer",
"minimum": -100000,
"maximum": 100000,
"description": "Add mode: business days to move. Negative counts backwards."
},
"jurisdiction": {
"type": "string",
"maxLength": 8,
"description": "Holiday jurisdiction id: US, GB, GB-SCT, GB-NIR, IE, FR, CA, AU, UG (alias UK for GB). No default: omit for no holiday calendar."
},
"customHolidays": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 1000,
"description": "Custom organizational holiday calendar as ISO dates (mutually exclusive with jurisdiction)"
},
"workweek": {
"type": "string",
"enum": [
"mon-fri",
"sun-thu",
"mon-sat"
],
"description": "Working week. Default mon-fri (Sat+Sun weekend)."
},
"tz": {
"type": "string",
"maxLength": 64,
"default": "UTC",
"description": "IANA timezone that defines \"today\" (e.g. Africa/Kampala). Default UTC."
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"answer": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "The calculated answer (kind-discriminated)"
},
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID"
}
},
"required": [
"answer",
"receipt"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢invoice_due(invoiceDate, net, roll, jurisdiction, customHolidays, ...)
Due date for Net-N payment terms (calendar days, invoice date = day 0). Optional roll-forward past weekends and, with a jurisdiction or custom calendar, public holidays.
Eingabe-Schema
{
"type": "object",
"properties": {
"invoiceDate": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)",
"default": "today"
},
"net": {
"type": "integer",
"minimum": 0,
"maximum": 3650,
"description": "Net-N payment terms in calendar days (Net 30 = 30)."
},
"roll": {
"type": "boolean",
"description": "Roll a weekend or holiday due date forward to the next business day. Default false."
},
"jurisdiction": {
"type": "string",
"maxLength": 8,
"description": "Holiday jurisdiction id: US, GB, GB-SCT, GB-NIR, IE, FR, CA, AU, UG (alias UK for GB). No default: omit for no holiday calendar."
},
"customHolidays": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 1000,
"description": "Custom organizational holiday calendar as ISO dates (mutually exclusive with jurisdiction)"
},
"workweek": {
"type": "string",
"enum": [
"mon-fri",
"sun-thu",
"mon-sat"
],
"description": "Working week. Default mon-fri (Sat+Sun weekend)."
},
"tz": {
"type": "string",
"maxLength": 64,
"default": "UTC",
"description": "IANA timezone that defines \"today\" (e.g. Africa/Kampala). Default UTC."
}
},
"required": [
"net"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"answer": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "The calculated answer (kind-discriminated)"
},
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID"
}
},
"required": [
"answer",
"receipt"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢next_occurrence(event, weekday, from, tz)
The next occurrence strictly after the base date (default today) of either a tracked event slug (e.g. "christmas") or a weekday (0 = Sunday .. 6 = Saturday). Provide exactly one of event/weekday.
Eingabe-Schema
{
"type": "object",
"properties": {
"event": {
"type": "string",
"maxLength": 40,
"description": "Event slug (e.g. christmas). Exactly one of event/weekday."
},
"weekday": {
"type": "integer",
"minimum": 0,
"maximum": 6,
"description": "0 = Sunday .. 6 = Saturday. Exactly one of event/weekday."
},
"from": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"tz": {
"type": "string",
"maxLength": 64,
"default": "UTC",
"description": "IANA timezone that defines \"today\" (e.g. Africa/Kampala). Default UTC."
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"answer": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "The calculated answer (kind-discriminated)"
},
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID"
}
},
"required": [
"answer",
"receipt"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢holidays(jurisdiction, year)
Observed public holidays with the nominal (legal) date and status: rule (statutory) or declared (officially declared for that year). Declared-only holidays are omitted for undeclared years, with a holiday_data_incomplete warning.
Eingabe-Schema
{
"type": "object",
"properties": {
"jurisdiction": {
"type": "string",
"maxLength": 8,
"description": "Holiday jurisdiction id: US, GB, GB-SCT, GB-NIR, IE, FR, CA, AU, UG (alias UK for GB)."
},
"year": {
"type": "integer",
"minimum": 1600,
"maximum": 3000,
"description": "Calendar year to list, e.g. 2027"
}
},
"required": [
"jurisdiction",
"year"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"answer": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "The calculated answer (kind-discriminated)"
},
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID"
}
},
"required": [
"answer",
"receipt"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢explain(op, date, days, from, to, ...)
Runs any operation and returns the receipt plus human-readable derivation steps. Set op, then pass the fields that operation's own tool takes. Use it when the user asks how an answer was reached.
Eingabe-Schema
{
"type": "object",
"properties": {
"op": {
"type": "string",
"enum": [
"add_days",
"subtract_days",
"days_between",
"business_days",
"invoice_due",
"next_occurrence",
"holiday_lookup"
],
"description": "Operation to explain. holiday_lookup is the holidays tool; the others share their tool's name."
},
"date": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"days": {
"type": "integer",
"minimum": -100000,
"maximum": 100000,
"description": "Day count for add_days, subtract_days and business_days add mode."
},
"from": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"to": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"invoiceDate": {
"type": "string",
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|today)$",
"description": "ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
},
"net": {
"type": "integer",
"minimum": 0,
"maximum": 3650,
"description": "Net-N payment terms in calendar days (Net 30 = 30)."
},
"roll": {
"type": "boolean",
"description": "Roll a weekend or holiday due date forward to the next business day. Default false."
},
"event": {
"type": "string",
"maxLength": 40,
"description": "Event slug (e.g. christmas). Exactly one of event/weekday."
},
"weekday": {
"type": "integer",
"minimum": 0,
"maximum": 6,
"description": "0 = Sunday .. 6 = Saturday. Exactly one of event/weekday."
},
"year": {
"type": "integer",
"minimum": 1600,
"maximum": 3000,
"description": "Calendar year for holiday_lookup, e.g. 2027"
},
"jurisdiction": {
"type": "string",
"maxLength": 8,
"description": "Holiday jurisdiction id: US, GB, GB-SCT, GB-NIR, IE, FR, CA, AU, UG (alias UK for GB). No default: omit for no holiday calendar."
},
"customHolidays": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 1000,
"description": "Custom organizational holiday calendar as ISO dates (mutually exclusive with jurisdiction)"
},
"workweek": {
"type": "string",
"enum": [
"mon-fri",
"sun-thu",
"mon-sat"
],
"description": "Working week. Default mon-fri (Sat+Sun weekend)."
},
"tz": {
"type": "string",
"maxLength": 64,
"default": "UTC",
"description": "IANA timezone that defines \"today\" (e.g. Africa/Kampala). Default UTC."
}
},
"required": [
"op"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Ausgabe-Schema
{
"type": "object",
"properties": {
"receipt": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Auditable receipt for the operation"
},
"steps": {
"type": "array",
"items": {
"type": "string"
},
"description": "Human-readable derivation, identical to the REST /api/v1/explain output"
}
},
"required": [
"receipt",
"steps"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Community
Nachweis