Servidor MCP

tilwhen date engine

com.tilwhen/tilwhen
Productividad Público y accesible MCP 2025-11-25

Qué hace este MCP

Performs deterministic calendar and business-day calculations, holiday lookups, due-date computation, natural-language date parsing, and auditable calculation explanations.

add_days
Add calendar days to a date
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['days'], 'properties': {'tz': {'type': 'string', 'default': 'UTC', 'maxLength': 64, 'description': 'IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.'}, 'date': {'type': 'string', 'default': 'today', 'pattern': '^(\\d{4}-\\d{2}-\\d{2}|today)$', 'description': 'ISO date YYYY-MM-DD, or "today" (resolved in tz)'}, 'days': {'type': 'integer', 'maximum': 100000, 'minimum': -100000, 'description': 'Whole calendar days to add. Negative counts backwards.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['answer', 'receipt'], 'properties': {'answer': {'type': 'object', 'properties': {}, 'description': 'The calculated answer (kind-discriminated)', 'additionalProperties': True}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID', 'additionalProperties': True}}, 'additionalProperties': False}
business_days
Business-day calculations
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'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', 'default': 'UTC', 'maxLength': 64, 'description': 'IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.'}, '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', 'maximum': 100000, 'minimum': -100000, 'description': 'Add mode: business days to move. Negative counts backwards.'}, 'from': {'type': 'string', 'pattern': '^(\\d{4}-\\d{2}-\\d{2}|today)$', 'description': 'ISO date YYYY-MM-DD, or "today" (resolved in tz)'}, 'workweek': {'enum': ['mon-fri', 'sun-thu', 'mon-sat'], 'type': 'string', 'description': 'Working week. Default mon-fri (Sat+Sun weekend).'}, '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)'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['answer', 'receipt'], 'properties': {'answer': {'type': 'object', 'properties': {}, 'description': 'The calculated answer (kind-discriminated)', 'additionalProperties': True}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID', 'additionalProperties': True}}, 'additionalProperties': False}
days_between
Days between two dates
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['from', 'to'], 'properties': {'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', 'default': 'UTC', 'maxLength': 64, 'description': 'IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.'}, 'from': {'type': 'string', 'pattern': '^(\\d{4}-\\d{2}-\\d{2}|today)$', 'description': 'ISO date YYYY-MM-DD, or "today" (resolved in tz)'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['answer', 'receipt'], 'properties': {'answer': {'type': 'object', 'properties': {}, 'description': 'The calculated answer (kind-discriminated)', 'additionalProperties': True}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID', 'additionalProperties': True}}, 'additionalProperties': False}
explain
Explain a calculation step by step
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['op'], 'properties': {'op': {'enum': ['add_days', 'subtract_days', 'days_between', 'business_days', 'invoice_due', 'next_occurrence', 'holiday_lookup'], 'type': 'string', 'description': "Operation to explain. holiday_lookup is the holidays tool; the others share their tool's name."}, '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', 'default': 'UTC', 'maxLength': 64, 'description': 'IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.'}, 'net': {'type': 'integer', 'maximum': 3650, 'minimum': 0, 'description': 'Net-N payment terms in calendar days (Net 30 = 30).'}, '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', 'maximum': 100000, 'minimum': -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)'}, 'roll': {'type': 'boolean', 'description': 'Roll a weekend or holiday due date forward to the next business day. Default false.'}, 'year': {'type': 'integer', 'maximum': 3000, 'minimum': 1600, 'description': 'Calendar year for holiday_lookup, e.g. 2027'}, 'event': {'type': 'string', 'maxLength': 40, 'description': 'Event slug (e.g. christmas). Exactly one of event/weekday.'}, 'weekday': {'type': 'integer', 'maximum': 6, 'minimum': 0, 'description': '0 = Sunday .. 6 = Saturday. Exactly one of event/weekday.'}, 'workweek': {'enum': ['mon-fri', 'sun-thu', 'mon-sat'], 'type': 'string', 'description': 'Working week. Default mon-fri (Sat+Sun weekend).'}, 'invoiceDate': {'type': 'string', 'pattern': '^(\\d{4}-\\d{2}-\\d{2}|today)$', 'description': 'ISO date YYYY-MM-DD, or "today" (resolved in tz)'}, '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)'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['receipt', 'steps'], 'properties': {'steps': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Human-readable derivation, identical to the REST /api/v1/explain output'}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt for the operation', 'additionalProperties': True}}, 'additionalProperties': False}
holidays
Public holidays for a jurisdiction and 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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['jurisdiction', 'year'], 'properties': {'year': {'type': 'integer', 'maximum': 3000, 'minimum': 1600, 'description': 'Calendar year to list, 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).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['answer', 'receipt'], 'properties': {'answer': {'type': 'object', 'properties': {}, 'description': 'The calculated answer (kind-discriminated)', 'additionalProperties': True}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID', 'additionalProperties': True}}, 'additionalProperties': False}
invoice_due
Invoice due date from net terms
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['net'], 'properties': {'tz': {'type': 'string', 'default': 'UTC', 'maxLength': 64, 'description': 'IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.'}, 'net': {'type': 'integer', 'maximum': 3650, 'minimum': 0, '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.'}, 'workweek': {'enum': ['mon-fri', 'sun-thu', 'mon-sat'], 'type': 'string', 'description': 'Working week. Default mon-fri (Sat+Sun weekend).'}, 'invoiceDate': {'type': 'string', 'default': 'today', 'pattern': '^(\\d{4}-\\d{2}-\\d{2}|today)$', 'description': 'ISO date YYYY-MM-DD, or "today" (resolved in tz)'}, '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)'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['answer', 'receipt'], 'properties': {'answer': {'type': 'object', 'properties': {}, 'description': 'The calculated answer (kind-discriminated)', 'additionalProperties': True}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID', 'additionalProperties': True}}, 'additionalProperties': False}
next_occurrence
Next occurrence of an event or weekday
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'tz': {'type': 'string', 'default': 'UTC', 'maxLength': 64, 'description': 'IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.'}, 'from': {'type': 'string', 'pattern': '^(\\d{4}-\\d{2}-\\d{2}|today)$', 'description': 'ISO date YYYY-MM-DD, or "today" (resolved in tz)'}, 'event': {'type': 'string', 'maxLength': 40, 'description': 'Event slug (e.g. christmas). Exactly one of event/weekday.'}, 'weekday': {'type': 'integer', 'maximum': 6, 'minimum': 0, 'description': '0 = Sunday .. 6 = Saturday. Exactly one of event/weekday.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['answer', 'receipt'], 'properties': {'answer': {'type': 'object', 'properties': {}, 'description': 'The calculated answer (kind-discriminated)', 'additionalProperties': True}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID', 'additionalProperties': True}}, 'additionalProperties': False}
parse_date_query
Parse a natural-language date question
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['q'], 'properties': {'q': {'type': 'string', 'maxLength': 200, 'minLength': 1, 'description': "The date question in plain language. Pass the user's wording rather than a date you computed."}, 'tz': {'type': 'string', 'default': 'UTC', 'maxLength': 64, 'description': 'IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.'}, 'locale': {'enum': ['mdy', 'dmy'], 'type': 'string', 'description': 'Resolves ambiguous slash dates; omit to receive clarification choices'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['parsed', 'confidence', 'warnings'], 'properties': {'answer': {'type': 'object', 'properties': {}, 'description': 'The calculated answer, absent when parsed is null', 'additionalProperties': True}, 'parsed': {'anyOf': [{'type': 'object', 'properties': {}, 'additionalProperties': True}, {'type': 'null'}], 'description': 'Normalized operation, or null when the query could not be understood confidently'}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt, absent when parsed is null', 'additionalProperties': True}, 'warnings': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Machine-readable notes, e.g. unsupported_unit or time_ignored'}, 'confidence': {'type': 'number', 'description': '1.0 is a clean grammar hit; below 0.5 the query is refused rather than guessed'}, 'canonicalUrl': {'type': ['string', 'null'], 'description': 'tilwhen page that answers this query, to cite; null when no page covers it'}, 'needsClarification': {'type': 'object', 'properties': {}, 'description': 'Present when the query is genuinely ambiguous (e.g. 03/04/2027); offers explicit choices instead of a guess', 'additionalProperties': True}}, 'additionalProperties': False}
subtract_days
Subtract calendar days from a date
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['days'], 'properties': {'tz': {'type': 'string', 'default': 'UTC', 'maxLength': 64, 'description': 'IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.'}, 'date': {'type': 'string', 'default': 'today', 'pattern': '^(\\d{4}-\\d{2}-\\d{2}|today)$', 'description': 'ISO date YYYY-MM-DD, or "today" (resolved in tz)'}, 'days': {'type': 'integer', 'maximum': 100000, 'minimum': -100000, 'description': 'Whole calendar days to subtract. Negative counts forwards.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['answer', 'receipt'], 'properties': {'answer': {'type': 'object', 'properties': {}, 'description': 'The calculated answer (kind-discriminated)', 'additionalProperties': True}, 'receipt': {'type': 'object', 'properties': {}, 'description': 'Auditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID', 'additionalProperties': True}}, 'additionalProperties': False}
Modificado
business_days
29 de September de 2026 a las 03:03
Modificado
days_between
29 de September de 2026 a las 03:03
Modificado
explain
19 de September de 2026 a las 02:52
Modificado
holidays
19 de September de 2026 a las 02:52
Modificado
next_occurrence
19 de September de 2026 a las 02:52
Modificado
invoice_due
19 de September de 2026 a las 02:52
Modificado
business_days
19 de September de 2026 a las 02:52
Modificado
days_between
19 de September de 2026 a las 02:52
Modificado
subtract_days
19 de September de 2026 a las 02:52
Modificado
add_days
19 de September de 2026 a las 02:52
Modificado
parse_date_query
19 de September de 2026 a las 02:52
Añadido
explain
17 de September de 2026 a las 12:38
Añadido
holidays
17 de September de 2026 a las 12:38
Añadido
next_occurrence
17 de September de 2026 a las 12:38
Añadido
invoice_due
17 de September de 2026 a las 12:38
Añadido
business_days
17 de September de 2026 a las 12:37
Añadido
days_between
17 de September de 2026 a las 12:37
Añadido
subtract_days
17 de September de 2026 a las 12:37
Añadido
add_days
17 de September de 2026 a las 12:37
Añadido
parse_date_query
17 de September de 2026 a las 12:37