Skip to main content
Glama
cn-mcp-kit

cn-mcp-kit

by yuannuo233

time_diff

Calculate how long ago or until a target time from now or another base time, and label the calendar relationship as today, yesterday, tomorrow, or N days away.

Instructions

计算某个时间点距离现在(或距离另一个时间)多久,并给出"今天/昨天/前天/明天/后天/n 天前"的日历关系。用来准确描述"这件事是刚发生的还是昨天发生的"。时间按本机时区解析。

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": {
      "target": "<target>"
    },
    "name": "time_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNo基准时间,省略则为现在。格式同 target
targetYes目标时间:2026-12-02、2026-12-02 21:40、2026年12月2日 21:40、ISO 带时区字符串或 Unix 时间戳;"now" 表示现在

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations at all, the description carries the full disclosure burden, and it does add real behavioral detail: time is parsed in the local machine timezone, and the base parameter defaults to the present when omitted. It also characterizes the output as a calendar relation bucket plus an elapsed duration. It does not cover invalid or unparseable input behavior, but the timezone and defaulting disclosures are meaningful context an agent could not get elsewhere.

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?

Three short sentences with no filler: purpose first, then intended use, then a parsing caveat. Each sentence carries distinct information and the most decision-relevant content is front-loaded.

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?

For a two-parameter, read-only computation with no output schema and full schema coverage, the description supplies enough to call it correctly: input formats via the schema, timezone semantics, the default base, and the shape of the answer. Gaps remain around error handling for unparseable timestamps and the exact output fields, which matter since there is no output schema to lean on.

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 annotation coverage is 100% and both parameters already document formats, the base default, and the 'now' sentinel. The description's only addition is the timezone-parsing rule, which does affect how target strings are interpreted, but it otherwise restates schema-level facts. Baseline 3 is appropriate given the schema does the heavy lifting.

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 a concrete operation (compute the distance between a time point and now or another time) and the specific output it produces (the today/yesterday/tomorrow/n-days-ago calendar relation). That is a clear verb plus resource, and it implicitly separates the tool from current_time by describing a relative computation rather than a clock read. It stops short of explicitly naming the sibling it differs from.

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 phrase about accurately describing 'whether this happened just now or yesterday' supplies a concrete usage scenario, so the intended context is implied rather than left entirely to inference. However, there is no explicit statement of when not to use it and no named alternative such as current_time, even though the two overlap for present-moment questions.

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