Add or subtract time from a date
add_to_dateCalculate an exact date by adding or subtracting days, weeks, months, or years from an ISO start date, including month-end handling for deadlines.
Instructions
Exact calendar arithmetic for deadlines. Use it instead of computing dates yourself. Months keep the day number, or use the last day of the month if it does not exist (31 Jan + 1 month = 28/29 Feb).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"start_date": "<start_date>",
"amount": "<amount>",
"unit": "<unit>"
},
"name": "add_to_date"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | ||
| amount | Yes | Whole number >= 0, e.g. 2 | |
| direction | No | 'after' for a later date, 'before' for an earlier one | after |
| start_date | Yes | ISO date, e.g. "2027-03-31" |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| weekday | Yes |