Skip to main content
Glama

Days between two dates

days_between
Read-onlyIdempotent

Signed whole calendar days from one date to another, midnight to midnight, endpoints exclusive (the gap).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesISO date YYYY-MM-DD, or "today" (resolved in tz)
tzNoIANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.UTC
fromYesISO date YYYY-MM-DD, or "today" (resolved in tz)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
answerYesThe calculated answer (kind-discriminated)
receiptYesAuditable receipt: inputs, timezone, convention, workweek, holiday calendar, exclusions, versions, stable result ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / to / $ref
      Removed value: -"#/properties/from"
    • addedInput schema / properties / to / description
      Added value: +"ISO date YYYY-MM-DD, or \"today\" (resolved in tz)"
    • addedInput schema / properties / to / pattern
      Added value: +"^(\\d{4}-\\d{2}-\\d{2}|today)$"
    • addedInput schema / properties / to / type
      Added value: +"string"
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the tool is safe to call. The description adds meaningful behavioral detail: signed result, midnight-to-midnight boundary, and endpoint exclusivity. This clarifies the exact calculation semantics beyond what annotations provide, though it doesn't discuss edge cases like DST, which is acceptable given the schema covers timezone handling.

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?

One sentence, zero filler, and the core semantics are front-loaded. The description is extremely efficient and earns every word.

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 read-only, idempotent date calculation with a full schema and output schema, the description fully specifies the behavior. No critical details are missing; an agent can correctly invoke it without needing additional context.

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?

The schema describes all three parameters with formats and the meaning of tz. The description's mention of 'from one date to another' aligns with the from/to parameters but adds no new detail beyond the schema. Since schema coverage is 100%, a baseline of 3 is appropriate.

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 computation: signed whole calendar days between two dates, with clear semantics (midnight-to-midnight, endpoints exclusive). This clearly differentiates it from siblings like add_days/subtract_days (which modify dates) and business_days (which count business days). The verb is implicit but the resource and operation are unambiguous.

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?

The description implies this is for calendar day gaps but does not explicitly direct the agent away from business_days or other sibling tools. Given the sibling list includes business_days, explicit routing would improve clarity, but the context is clear enough that an agent can infer when to use it.

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