Skip to main content
Glama

Days between dates calculator

hopi_days_between_dates
Read-onlyIdempotent

Count the number of days between two dates, with the total also shown in weeks and in weekdays (Monday to Friday). Dates use the YYYY-MM-DD format. Set inclusive to true to count both end days. Source: https://hopi.co.uk/days-between-dates/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd date in YYYY-MM-DD format
fromYesStart date in YYYY-MM-DD format
inclusiveNoCount both end days rather than excluding the end day (default false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes
daysYes
fromYes
weeksYes
summaryYes
swappedYes
weekdaysYes
inclusiveYes
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)
remainderDaysYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "days",
      +  "from",
      +  "inclusive",
      +  "remainderDays",
      +  "source_url",
      +  "summary",
      +  "swapped",
      +  "to",
      +  "weekdays",
      +  "weeks"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark the operation read-only, idempotent, and non-destructive. The description adds valuable behavioral context: the result includes weeks and weekdays, dates follow YYYY-MM-DD, and inclusive changes end-day counting. No contradiction exists.

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?

Three sentences plus a source URL. Each sentence carries distinct information: output units, date format, inclusive option. Core purpose is front-loaded and there is no redundancy or filler.

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?

The tool is read-only, has a fully documented schema, and an output schema exists. The description covers everything needed for correct invocation: date format, inclusive semantics, and output dimensions. Source link adds credibility. No critical gaps.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3. The description largely repeats what the schema already states (date format, inclusive behavior), adding minimal extra meaning beyond making the default semantics explicit.

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 opens with a specific verb ('Count') and resource ('number of days between two dates'), and further specifies output units (days, weeks, weekdays with Monday-to-Friday definition). This uniquely identifies the tool among many calculator siblings without requiring schema inspection.

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 core use case is clearly stated: count days between two dates. It also explains the optional inclusive flag semanticsikuha. However, it does not explicitly name alternatives or state when-not-to-use, so while context is clear, exclusions are absent.

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