Skip to main content
Glama

Date calculator

hopi_date_calculator
Read-onlyIdempotent

Add or subtract a number of days, weeks, months or years from a date. Dates use the YYYY-MM-DD format. Months and years are clamped to the last day of the target month where needed. Returns the resulting date. Source: https://hopi.co.uk/date-calculator/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesStart date in YYYY-MM-DD format
unitNoUnit to move by (default 'days')days
amountYesHow many units to move (0 to 100000)
directionNo'add' to move forwards, 'subtract' to move backwards (default 'add')add

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes
unitYes
amountYes
resultYes
summaryYes
weekdayYes
directionYes
resultLongYes
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "amount",
      +  "date",
      +  "direction",
      +  "result",
      +  "resultLong",
      +  "source_url",
      +  "summary",
      +  "unit",
      +  "weekday"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish that the tool is read-only, idempotent, and non-destructive. The description adds genuine behavioral detail beyond those hints: months and years are clamped to the last day of the target month, and dates use YYYY-MM-DD. This is valuable edge-case disclosure for a simple pure calculator.

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?

The description is compact and well-structured: the operation and units are front-loaded, the format and edge-case behavior follow, and the source URL is harmlessly placed at the end. Every sentence earns its place.

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 deterministic date arithmetic tool, the description covers the operation, the accepted units, the expected date format, the key edge case (clamping), and the return value. The schema covers all parameters and the output schema covers the result, so nothing needed to invoke this tool correctly 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?

The input schema already documents all parameters with descriptions and enums, so the baseline is 3. The description adds meaning beyond the schema by explaining the clamping behavior for months and years, which affects how the 'unit' parameter behaves. This justifies one step above baseline.

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

Purpose5/5

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

The description states a specific operation ('Add or subtract') on a specific resource ('a date') with exact units (days, weeks, months, years) and notes the return value. This is clearly distinguishable from siblings like hopi_add_working_days or hopi_days_between_dates.

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

Usage Guidelines4/5

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

The opening phrase gives the agent a precise selection condition: shift a calendar date by units of time. The unit list also implicitly excludes working-day-specific tools. However, no explicit alternative or when-not-to-use guidance is provided, so it falls just short of a 5.

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