Skip to main content
Glama

datetime.diff

Read-onlyIdempotent

Calculate the whole-unit difference between two YYYY-MM-DD dates in days, weeks, months, or years, returning a signed integer with no fractional remainder.

Instructions

두 날짜의 차이를 unit(days | weeks | months | years) 단위의 정수 문자열 value 로 돌려준다. 날짜는 YYYY-MM-DD 이다. weeks 는 일수를 7 로 나눈 몫(내림), months 와 years 는 가득 찬 달과 해만 세며 end 가 start 보다 앞서면 음수이다. 소수 단위나 남는 일수는 주지 않는다.

Input Schema

NameRequiredDescriptionDefault
endYes
unitYes
startYes

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
valueYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, openWorldHint=false), and the description adds real computational semantics beyond them: weeks floors by 7, months/years count only complete periods, and the sign flips when end precedes start. It does not mention error behavior for malformed dates or unsupported units.

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?

Four dense sentences, front-loaded with the return contract and followed by unit semantics and the sign rule. No filler, though the unit definitions and the date format are stated in separate sentences that could be tightened.

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, and the description already states the return is an integer string, so return-value explanation is not required. Combined with annotations covering safety and the description covering all three parameters, the definition is nearly complete; only invalid-input behavior is unaddressed.

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 0% and no parameter has an enum, so the description carries the full burden — and it does so well, fixing the YYYY-MM-DD format for start/end and enumerating the unit domain (days | weeks | months | years) with per-unit computation rules. It stops short of naming each parameter's role explicitly (start vs end other than via the negative-case remark).

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?

States a specific verb+resource (difference between two dates) and enumerates the four output units, so the agent knows exactly what is computed. It does not differentiate from close siblings such as datetime.day_count or datetime.age, which likely overlap, so an agent must infer which to pick.

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?

Usage is only implied by the unit semantics; there is no explicit statement of when to choose datetime.diff over datetime.day_count or datetime.age, nor any note on invalid inputs. Adequate but leaves routing to inference.

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