Skip to main content
Glama
mcp-toolkit

mcp-toolkit

by Dongnb66

date_calc

Performs date arithmetic and checks: add or subtract days, calculate date differences, find weekdays, verify leap years, get days in a month, and retrieve today's date using YYYY-MM-DD UTC dates.

Instructions

日期计算:加减天数、求日期差、查星期几、判断闰年、查当月天数、取今天日期。日期统一 YYYY-MM-DD 格式,按 UTC 处理规避跨日误差。

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": {
      "op": "<op>"
    },
    "name": "date_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes操作类型
toNo结束日期,diff_days 需要
dateNoYYYY-MM-DD,add_days/weekday 需要
daysNo加减天数,add_days 需要
fromNo起始日期,diff_days 需要
yearNo年份,days_in_month/is_leap_year 需要
monthNo月份 1-12,days_in_month 需要

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose two valuable behavioral traits — all dates are normalized to YYYY-MM-DD and computed in UTC to avoid off-by-one day errors — which an agent could not infer from the schema alone. It says nothing, though, about error handling for malformed dates, out-of-range months, or what shape each operation returns.

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 sentences with no filler: the operation inventory comes first, then the format/timezone convention. Every clause earns its place and nothing is repeated from the schema verbatim.

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?

With no output schema and no annotations, the description should ideally indicate what each operation returns (a date string, an integer day count, a boolean). It covers inputs and conventions well but leaves the return side entirely unspecified across six distinct operations, which is a real gap for an agent chaining results.

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?

Schema description coverage is 100%, so every one of the seven parameters is already documented, including the `op` enum. The description reinforces the YYYY-MM-DD convention and UTC semantics but adds no per-parameter meaning beyond what the schema states; the baseline 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 names the resource (dates) and enumerates the six concrete operations — add/subtract days, date difference, weekday, leap year, days in month, today — which map one-to-one onto the `op` enum values. An agent can immediately tell this is a pure date-arithmetic utility and needs no sibling differentiation, since the sibling tools (jwt_decode, sqlite_query, etc.) do unrelated work.

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 operation list implies when each mode applies, and the schema's parameter descriptions tie inputs to specific ops (e.g. `to` for diff_days, `year` for leap year). However, there is no explicit when-to-use/when-not guidance, no statement of prerequisites, and no mention of what to do for unsupported date manipulations.

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