Skip to main content
Glama
yanglinfeng

Memory Bridge

by yanglinfeng

日期平移

answer_date_shift
Read-onlyIdempotent

Shift a date by a specified number of days (can be negative) and return the resulting date and weekday. Answers questions like 'What date is X days from now?' or 'What was the date N days ago?'

Instructions

把日期平移指定天数(可为负),返回结果日期与星期。"X 天后是几号""提前 N 天"类问题调用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes基准日期
daysYes平移天数,可为负数
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile needs no restating. The description adds genuinely new behavioral information: negative day offsets are allowed and the result includes both the date and the weekday. It does not mention accepted input date formats or boundary behavior, which keeps it from a 5.

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 short sentences: the operation and its return value come first, then the usage trigger. No filler, no repetition of the title, and nothing that could be trimmed without losing 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?

For a two-required-parameter, closed-world, idempotent read tool with full schema coverage, the description covers operation, accepted sign of the offset, and the return shape (no output schema exists, so stating the return value matters). The only material gap is the expected date input format, which an agent must guess at given the loose 4–40 character constraint.

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% — the schema itself documents 基准日期 and 平移天数,可为负数, and even the injected _memoryRequestKey. The description's note that days may be negative merely repeats the schema, adding no new semantics, so the baseline 3 applies.

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 and resource (把日期平移指定天数) and even names the return value (结果日期与星期), so an agent immediately knows this is date arithmetic, not date parsing or lookup. It stops short of explicitly distinguishing itself from the sibling answer_date_diff, relying on the reader to infer 'shift' vs 'difference'.

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 second sentence gives concrete triggering question shapes ("X 天后是几号", "提前 N 天"), which is real usage guidance rather than vague intent. It does not, however, name answer_date_diff or answer_calculator as the alternative for non-shift date questions, so the boundary between siblings is left implicit.

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