Skip to main content
Glama

Time of Meeting

Days between two dates

days_between
Read-onlyIdempotent

Count calendar days from start to end. Use when the user asks how many days are between two dates. Both are YYYY-MM-DD. include_start and include_end default to false, so the count is the dates strictly after start and strictly before end: 2024-02-28 to 2024-03-01 is 1 in a leap year (29 February) and 0 in a common year. Set both to true to count every date from start through end (3 in that leap-year span, 2 otherwise). The count is negative when end is before start. The same day is 0 unless both ends are included, which is 1. The result is that count and nothing else.

Input Schema

NameRequiredDescriptionDefault
endYesSecond date, YYYY-MM-DD.
startYesFirst date, YYYY-MM-DD.
include_endNoCount end. Default false.
include_startNoCount start. Default false.

Output Schema

NameRequiredDescriptionDefault
daysYes
errorNo
candidatesNo
alternativesNoOther cities that matched the same name, after the best-ranked city was chosen. The order is the site search order: match, then priority, then population.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare this as a read-only, idempotent, closed-world operation, and the description goes well beyond them: it explains that the count is exclusive by default, that a negative result means end precedes start, and that leap years shift the answer. This is precisely the off-by-one behavior an agent would otherwise get wrong.

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?

It is front-loaded with the purpose and usage trigger, then layered with the semantics that matter. A few sentences are near-duplicative — the same-day-equals-zero case restates the general exclusivity rule, and 'the result is that count and nothing else' is largely redundant given the output schema — but no sentence is 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?

For a four-parameter date arithmetic tool, the definition covers inputs, defaults, boundary semantics, sign behavior, leap-year behavior, and the identity case. With an output schema present it correctly avoids describing the return shape in detail, so nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 100% and already states the defaults, yet the description adds real meaning: worked examples show that include_start/include_end control strict-vs-inclusive boundaries ('2024-02-28 to 2024-03-01 is 1 in a leap year... 3 in that leap-year span' with both true). The parameter descriptions alone ('Count start. Default false.') could not convey that.

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 and resource ('Count calendar days from start to end') and the word 'calendar' implicitly separates it from the sibling working_days_between. An agent can tell immediately that this is a pure day-count, not a business-day or duration-formatting tool.

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?

It gives a clear trigger condition: 'Use when the user asks how many days are between two dates.' However, it never names an alternative or exclusion — for example, that business-day counting belongs to working_days_between or that adding an offset belongs to add_days — so the routing is only half-specified.

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