Skip to main content
Glama

ClockCrest time tools

Add a duration to a date

add_duration
Read-onlyIdempotent

Adds or subtracts years, months, weeks and days to a calendar date and returns the resulting date with its weekday and ISO week. Give at least one unit. Month ends are clamped (31 January + 1 month = 28 or 29 February).

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": {
      "date": "<date>"
    },
    "name": "add_duration"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesStart date, YYYY-MM-DD
daysNoDays to add (may be negative)
weeksNoWeeks to add (may be negative)
yearsNoYears to add (may be negative)
monthsNoMonths to add (may be negative)

Output Schema

NameRequiredDescriptionDefault
dateYesCalendar date, YYYY-MM-DD
addedYes
notesYesCaveats and conventions that apply to this response.
resultYesCalendar date, YYYY-MM-DD
sourceYesWhere the data or the algorithm comes from.
weekdayYesEnglish weekday name
daysBetweenYes
resultIsoWeekYes
resultWeekdayYesEnglish weekday name
resultIsoWeekYearYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already establish read-only, idempotent, non-destructive, and closed-world behavior. The description adds meaningful behavioral detail beyond that: it returns the resulting date with weekday and ISO week, and it discloses month-end clamping with a concrete example.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tightly written sentences front-load the core operation and then supply the essential constraint and edge-case behavior. No sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With rich annotations, full schema coverage, and an output schema, the description is nearly complete. One remaining gap is that it does not specify the order in which multiple units are applied, which can matter for combined year/month/week/day arithmetic.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3. The description adds semantic value beyond the schema by imposing the "at least one unit" constraint, which the schema does not enforce via required/anyOf, and by explaining month-end clamping behavior for the months parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: it adds or subtracts years, months, weeks, and days to a calendar date and returns the resulting date with weekday and ISO week. It is clear about scope, though it does not explicitly name or differentiate itself from siblings like add_business_days or calculate_date_difference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It includes a useful usage constraint — "Give at least one unit" — which is implied by the schema's optional duration parameters. However, it does not explain when to use this tool instead of calculate_date_difference or add_business_days, leaving alternatives to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources