Skip to main content
Glama

Days Between Two Dates

days_between
Read-onlyIdempotent

Count the days between two dates: total days (optionally including the start day), weeks and days, years/months/days, Japanese business days (excluding weekends and Japanese national holidays from the Cabinet Office list) and weekdays (Mon-Fri). Exact calendar arithmetic, no time zones. Dates 1873-01-01 to 2200-12-31.

Input Schema

NameRequiredDescriptionDefault
langNoLanguage of the user. Use "ja" when the user writes in Japanese (affects the source link and notes). Default "en".
end_dateYesDate in YYYY-MM-DD (1873-01-01 to 2200-12-31)
start_dateYesDate in YYYY-MM-DD (1873-01-01 to 2200-12-31)
include_start_dayNoCount the start day too (e.g. 2026-01-01 to 2026-01-01 = 1 day). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this as a read-only, idempotent, non-destructive, closed-world operation. The description adds substantive behavioral context on top: exact calendar arithmetic with no time-zone handling, the valid date envelope (1873-01-01 to 2200-12-31), and the dependency on the Cabinet Office holiday list for Japanese business days.

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 tight sentences, front-loaded with the core verb and the list of produced measurements, followed by precision caveats (no time zones) and the valid range. No redundant or filler phrasing.

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 no output schema, the description usefully enumerates what is returned (total days, weeks/days, years/months/days, Japanese business days, weekdays) and carries the time-zone and date-range constraints. It does not clarify the return shape (single object vs. multiple fields) or the inclusive/exclusive default of the end date, leaving a small gap.

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 description coverage is 100%, so all four parameters (including the lang enum and include_start_day semantics) are already documented. The description only restates the optional start-day inclusion and the date range, adding no format or edge-case meaning beyond the schema. Baseline 3 applies.

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?

States a specific verb ('Count the days between two dates') plus the exact measurement modes it produces, which clearly separates it from siblings like add_days, calculate_age, and convert_japanese_era. An agent can identify the resource and scope without opening the schema.

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?

Usage is implied by the enumeration of measurement modes (business days, weekdays, weeks/days), but there is no explicit statement of when to choose this over add_days or calculate_age, nor any exclusion guidance. A competent agent can infer the fit, but the routing signal is weak.

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