Skip to main content
Glama

第 N 个工作日

workday_add

Calculate the nth business day after or before a specific date, correctly excluding weekends and statutory holidays. Use it to determine precise deadlines, such as calculating the date three workdays from now.

Instructions

计算某日期之后(n 为负数则之前)的第 n 个工作日,常用于"3 个工作日内发货"之类的截止日期

Input Schema

NameRequiredDescriptionDefault
nYes工作日数,可为负
dateYes日期,格式 YYYY-MM-DD

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that negative n moves backwards, but leaves open a critical question for a workday calculator: which calendar defines a workday (weekends only, or national holidays via holiday_check?), plus timezone and out-of-range/invalid-date behavior.

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?

A single front-loaded sentence that defines the operation, the negative-n case, and a motivating example — no filler. It could be marginally tighter, but nothing is wasted.

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?

For a simple two-parameter tool with a fully described schema, little is required, and no output schema is needed to explain a date result. However, the workday definition (weekend-only vs. statutory holidays) is exactly the detail an agent needs to call this correctly, and it is absent.

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%, with both parameters documented (n as an integer that may be negative, date as YYYY-MM-DD). The description's note that negative n means 'before' echoes the schema rather than adding new meaning, so the baseline 3 applies.

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?

States a specific verb (计算) and resource (第 n 个工作日) with scope: after a date, or before it when n is negative. That directionality cleanly separates it from the sibling workday_count, which counts workdays rather than offsetting by n.

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 '3 个工作日内发货' example implies a deadline-calculation use case, which is helpful context. But it never states when to prefer workday_count over workday_add, nor any exclusions or prerequisites, so alternatives must be inferred.

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