Skip to main content
Glama

Subtract calendar days from a date

subtract_days
Read-onlyIdempotent

The date N whole calendar days before a date (exclusive counting: the start date is day 0). Omit date for today in tz. For working days use business_days; for the gap between two dates use days_between.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tzNoIANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC.UTC
dateNoISO date YYYY-MM-DD, or "today" (resolved in tz)today
daysYesWhole calendar days to subtract. Negative counts forwards.

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. Changed1 schema field changed
    • addedInput schema / properties / days / description
      Added value: +"Whole calendar days to subtract. Negative counts forwards."
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds the crucial exclusive-counting rule ('start date is day 0') and clarifies that 'today' is resolved in tz, which are behavioral details beyond the structured fields and not contained in annotations.

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?

Two tight sentences with no filler; the core counting rule is front-loaded, followed by usage defaults and sibling alternatives. Every clause earns its place.

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 pure computation tool, the description plus schema fully covers inputs, defaults, edge semantics, and alternative tools. The presence of an output schema means return-value details do not need to be restated, and nothing essential is missing for correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so parameter names and defaults are already documented. The description adds meaning beyond the schema by defining the exact day-count convention and explaining how to omit the date parameter to use today in a timezone, which refines the semantics of both 'days' and 'date'.

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?

Description states a specific operation: returns the date N whole calendar days before a given date, with explicit exclusive-counting semantics. It also differentiates itself from sibling tools by naming business_days and days_between, clarifying that this is the calendar-day subtraction tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear when-to-use guidance: 'Omit date for today in tz' tells users how to default the main input, and explicitly routes working-day and date-gap use cases to business_days and days_between respectively. No ambiguity remains about which sibling to choose.

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