API & MCP
Everything a person can do on RuleDate Deadline Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ruledate.usefulweb.site/api/v1/calculate– run RuleDate Deadline CalculatorGET https://ruledate.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
RuleDate Deadline Calculator
Chain date operations (add business days, add months with clamping, end of month, roll to next business day) on a start date. RuleDate uses public holidays for 16 countries and their subdivisions (2024–2030) and shows every skipped date with its reason, so the result can be checked rather than trusted.
| Field | Type | Default | Description |
|---|---|---|---|
startDate (required) | date | — | Start date |
operations (required) | table | — | Operations (applied in order) |
country | select (none, DE, AT, CH, US, GB, FR, NL, BE, ES, IT, PL, SE, DK, IE, CA, AU) | "DE" | Holiday calendar |
subdivision | text | — | Subdivision (optional). ISO 3166-2 code, e.g. DE-BY (Bavaria), CH-ZH, US-CA. Without it only nationwide holidays count. |
weekendDays | multiselect (sun, mon, tue, wed, thu, fri, sat) | ["sat","sun"] | Weekend days |
closures | list | — | Extra closure dates. One YYYY-MM-DD per line (company holidays, bridge days). |
monthEndRule | select (clamp, overflow) | "clamp" | Month arithmetic |
finalRule | select (none, bgb193) | "none" | Final adjustment |
Example request
10 business days from 25 Sep 2026 in Bavaria
curl -X POST https://ruledate.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"startDate":"2026-09-25","operations":[{"op":"add-business-days","amount":10}],"country":"DE","subdivision":"DE-BY"}'
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://ruledate.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ruledate - Local stdio connector:
node src/mcp-stdio.ts --tool=ruledate
{
"mcpServers": {
"ruledate": { "type": "http", "url": "https://ruledate.usefulweb.site/mcp" }
}
}