Skip to main content
Glama
rag-mcp-server

rag-mcp-server

by supu02

Add or subtract time from a date

add_to_date
Read-onlyIdempotent

Calculate an exact date by adding or subtracting days, weeks, months, or years from an ISO start date, including month-end handling for deadlines.

Instructions

Exact calendar arithmetic for deadlines. Use it instead of computing dates yourself. Months keep the day number, or use the last day of the month if it does not exist (31 Jan + 1 month = 28/29 Feb).

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_date": "<start_date>",
      "amount": "<amount>",
      "unit": "<unit>"
    },
    "name": "add_to_date"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitYes
amountYesWhole number >= 0, e.g. 2
directionNo'after' for a later date, 'before' for an earlier oneafter
start_dateYesISO date, e.g. "2027-03-31"

Output Schema

NameRequiredDescriptionDefault
dateYes
weekdayYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish this as a read-only, idempotent, closed-world operation, so the description is not carrying the safety burden. What it does add is genuinely useful behavior: the month-end clamping rule with a worked example (31 Jan + 1 month = 28/29 Feb), which the agent cannot infer from annotations or schema.

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?

Three short sentences ordered well: purpose, usage directive, then the tricky edge case. Front-loaded and free of filler, though the parenthetical example is the only thing anchoring it and the 'for deadlines' qualifier adds slight noise rather than information.

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?

An output schema exists, so return values need not be explained, and annotations cover the safety profile. The one real omission is that the description never mentions the 'direction' parameter or subtraction, despite 'add or subtract' appearing only in the title; the worked example covers addition only.

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 75%, with amount, direction, and start_date already documented inline, so the baseline is near 3. The description earns above that by explaining the non-obvious rollover semantics that apply when unit='months', which the schema does not state. The 'years' and 'weeks' units are left without any analogous edge-case note.

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?

The description names the operation (calendar arithmetic on a date) and the title disambiguates it as add/subtract. It is clearly distinguishable from days_between and search_documents, but the phrasing 'for deadlines' slightly narrows what is actually a general-purpose date calculator.

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 direct directive: 'Use it instead of computing dates yourself,' which tells the agent not to do the arithmetic mentally. It does not, however, contrast itself with the days_between sibling for difference calculations, so the routing is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools