Skip to main content
Glama

shift_datetime

Add or subtract years, months, weeks, days, hours, minutes, or seconds from a date-time, defaulting to now; use negative values to calculate past dates.

Instructions

Add or subtract an amount of time to a date-time (default: now). Use negative numbers for the past. Years, months, weeks and days keep the wall time; if the day does not exist in the new month, the last day of that month is used (2024-01-31 + 1 month = 2024-02-29). Hours, minutes and seconds are elapsed time. Accepted forms: '2024-12-10', '2024-12-10 14:30', '2024-12-10T14:30:00+09:00', '2024/12/10', '2024年12月10日 14時30分', Japanese era such as '令和6年12月10日' or 'R6.12.10', and a time only such as '14:30' (today).

Input Schema

NameRequiredDescriptionDefault
baseNoStart date-time. Omit to start from now.
daysNo
hoursNo
weeksNo
yearsNo
formatNoOutput format name or custom pattern, as in get_datetime.datetime
monthsNo
minutesNo
secondsNo
timezoneNoIANA timezone of 'base' and of the result. Omit for local time.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does substantial work: it discloses the calendar-vs-elapsed distinction between years/months/weeks/days and hours/minutes/seconds, and the month-end clamping rule with a concrete example (2024-01-31 + 1 month = 2024-02-29). This is non-obvious behavior an agent could not infer from the schema. It does not say what happens on unparseable input or how errors surface, which keeps it below a 5.

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

Conciseness4/5

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

The core action and default are front-loaded in the first sentence, followed by semantics and then a format list. The long enumeration of accepted forms is dense but each example adds real parsing knowledge rather than restating the schema. It is a single unbroken paragraph, which slightly hurts scannability but not substance.

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

Completeness5/5

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

For a 10-parameter, all-optional tool with no annotations, the description covers the defaults, the unit semantics, the month-end edge case, and the full range of accepted input formats. Return values are handled by the existing output schema, so leaving them out is correct. Nothing an agent needs in order to construct a valid call is missing.

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 description coverage is only 30%, so the description must compensate, and it does: the accepted base formats are enumerated in detail (ISO, slash form, Japanese, era notation, time-only) and the six unit parameters are given real meaning via the calendar/elapsed distinction and negative-value rule. The 'format' parameter is left to the schema's reference to get_datetime, and timezone is not discussed in the description, so the compensation is strong but incomplete.

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 opens with a specific verb+resource: 'Add or subtract an amount of time to a date-time (default: now)'. An agent can immediately distinguish this arithmetic tool from get_datetime (read current) and convert_time (timezone conversion) without opening the schema. It stops short of naming those siblings explicitly, so it is clear but not fully differentiated.

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 gives useful calling guidance: omit 'base' to start from now, and use negative numbers to shift into the past. However, there is no statement of when to prefer this over convert_time or get_datetime, and no exclusions or error conditions. Usage is implied by the purpose rather than stated against alternatives.

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