Skip to main content
Glama

calculate_date

Perform date arithmetic: calculate days between dates, add or subtract days/months/years, or get weekday and Unix timestamp. Use for scheduling and date calculations.

Instructions

Date arithmetic and difference calculations.

Use this to find days between dates, add/subtract time,
or get date info (weekday, unix timestamp).

Parameters:
    op     — 'info' (default), 'diff', or 'add'.
    date1  — Start date (ISO format, default: today).
    date2  — End date (for 'diff' operation).
    days   — Days to add (for 'add' operation).
    months — Months to add (for 'add' operation).
    years  — Years to add (for 'add' operation).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opNoinfo
date1No
date2No
daysNo
monthsNo
yearsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the burden. It lists parameters and defaults but does not disclose potential side effects, error handling, output format, or constraints (e.g., date format, timezone handling). The output schema exists but is not referenced.

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 description is concise: a brief purpose sentence, a usage sentence, and a parameter list. No fluff. The structure is front-loaded with purpose. Minor improvement could be bullet points for parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 6 parameters (0 required) and an output schema, the description covers the main operations and parameters but lacks details on edge cases, default behavior per op, and validation. It is adequate for a calculator tool but leaves some gaps for an AI agent.

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 description coverage is 0%, so the description must compensate. It provides a clear parameter list with brief explanations for each (op, date1, date2, days, months, years), which adds meaning beyond the schema's just names and defaults.

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 clearly states the tool performs date arithmetic and difference calculations, and lists specific use cases (find days between dates, add/subtract time, get date info). This distinguishes it from sibling date tools like calculate_age or calculate_business_days.

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?

The description explicitly says when to use the tool (for finding days between dates, adding/subtracting time, getting date info). However, it does not provide exclusions or comparisons to alternative sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scotia1973-bot/api-hub'

If you have feedback or need assistance with the MCP directory API, please join our Discord server