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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "start": "<start>",
      "end": "<end>"
    },
    "name": "days_between"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYesSecond date, YYYY-MM-DD. Also accepted: YYYY-MM-DDTHH:MM, YYYY-MM-DDTHH:MM:SSZ, YYYY/MM/DD, or YYYYMMDD.
startYesFirst date, YYYY-MM-DD. Also accepted: YYYY-MM-DDTHH:MM, YYYY-MM-DDTHH:MM:SSZ, YYYY/MM/DD, or YYYYMMDD.
include_endNoCount end. Default false.
include_startNoCount start. Default false.

Output Schema

NameRequiredDescriptionDefault
daysYes
errorNo
candidatesNo
zone_notesNoPresent when a city argument was a time zone abbreviation or fixed offset such as EST or UTC+2. Says which time zone it was read as, and what else the abbreviation can mean.
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. Changed1 schema field changed
    • addedOutput schema / properties / zone_notes
      Added value: +{
      +  "description": "Present when a city argument was a time zone abbreviation or fixed offset such as EST or UTC+2. Says which time zone it was read as, and what else the abbreviation can mean.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / end / description
      Previous value: -"Second date, YYYY-MM-DD."New value: +"Second date, YYYY-MM-DD. Also accepted: YYYY-MM-DDTHH:MM, YYYY-MM-DDTHH:MM:SSZ, YYYY/MM/DD, or YYYYMMDD."
    • changedInput schema / properties / start / description
      Previous value: -"First date, YYYY-MM-DD."New value: +"First date, YYYY-MM-DD. Also accepted: YYYY-MM-DDTHH:MM, YYYY-MM-DDTHH:MM:SSZ, YYYY/MM/DD, or YYYYMMDD."
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations cover safety (readOnly, idempotent, non-destructive), and the description goes well beyond them: default exclusivity of both endpoints, negative results when end precedes start, same-day equals zero, and leap-year worked examples. That is exactly the behavioral context structured fields cannot carry.

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 behavior and its caveats are front-loaded and every clause addresses a real edge case. It runs a bit long, restating the leap-year example twice and adding a redundant same-day sentence, which keeps it from a perfect score.

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 two-date counting tool this covers defaults, sign behavior, boundary semantics, and even the return payload ('that count and nothing else'), despite an output schema already existing. Nothing an agent needs to invoke 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%, yet the description still adds real meaning for include_start/include_end by showing their semantic effect: strict-interior counting by default, inclusive counting when both are true, with concrete leap-year arithmetic. Minor caveat: it says 'Both are YYYY-MM-DD' while the schema accepts several extra formats, slightly under-describing input flexibility.

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?

States a specific verb and resource: 'Count calendar days from start to end.' The adjective 'calendar' implicitly distinguishes it from working_days_between, but no sibling is named explicitly, so it falls short of a 5 on differentiation.

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?

'Use when the user asks how many days are between two dates' gives a clear trigger condition. There are no explicit exclusions or named alternatives, so the agent must infer that business-day counting belongs elsewhere.

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