Skip to main content
Glama

Mainland China Working Days Between Dates

count_china_working_days
Read-onlyIdempotent

Use this when you need the number of official mainland China working days in a 2024-2026 date range for an SLA, payroll, project or delivery estimate. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when you need only elapsed calendar days, another jurisdiction, an industry-specific settlement calendar, or dates outside 2024-2026. What it computes: Counts official mainland China working and non-working days in a date range using State Council holiday periods and weekend makeup workdays rather than a simple Monday-Friday rule. Example user requests: How many official China working days are there from 2026-09-18 through 2026-09-25, inclusive? | 计算2026年国庆节前后这段日期中实际需要上班的天数,要包含调休周末。 | Count mainland China business days between 2025-01-24 and 2025-02-10. Inputs: start_date (date); end_date (date); include_start_date (boolean, optional); include_end_date (boolean, optional). Complete JSON argument examples: {"start_date":"2026-09-18","end_date":"2026-09-25","include_start_date":true,"include_end_date":true} Outputs: normalized_start_date, normalized_end_date, working_days [working days], non_working_days [days], calendar_days_counted [days], adjusted_workdays_counted, holiday_dates_counted [days], source_document_ids, dataset_version, coverage_start, coverage_end. Formula: for each included date: working_days += is_working_day(date); non_working_days += not is_working_day(date) Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/china-working-days-between with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/everyday/china-working-days-between.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateYesLast date of the range (YYYY-MM-DD), within 2024-2026. Earlier dates are normalized and reported in a note.
start_dateYesFirst date of the range (YYYY-MM-DD), within 2024-2026.
include_end_dateNoWhether end_date participates in the count.
include_start_dateNoWhether start_date participates in the count.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "end_date": "2026-09-25",
      +    "include_end_date": true,
      +    "include_start_date": true,
      +    "start_date": "2026-09-18"
      +  }
      +]
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark it as read-only, idempotent, and non-destructive. The description adds critical behavioral nuance: it counts official working days using State Council holiday periods and weekend makeup workdays, not a simple Monday-Friday rule. It also explains the formula and mentions date normalization for out-of-range dates. This goes beyond the annotations and clarifies the non-trivial counting logic, so the agent understands exactly what the tool does.

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?

The description is front-loaded with the primary use case and exclusions, then systematically covers what it computes, example requests, inputs, outputs, formula, REST fallback, and docs. Every section serves a purpose with no filler. It is detailed but efficiently organized, and the structure makes it easy for an agent to parse and act on.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with this complexity, the description is fully complete. It includes the algorithm, output fields, date range constraints, REST fallback, documentation link, and example inputs. The output schema exists and is summarized. An agent has all information needed to select, invoke, and interpret results without further discovery.

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 coverage is 100%: each parameter has a description, examples, and defaults. The description lists the inputs and provides a complete JSON example, but does not add semantics beyond what the schema already provides. It mentions the 2024-2026 range, which is also in the schema. Per the rubric, with high schema coverage, baseline 3 is appropriate; the description offers no extra parameter meaning.

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 opens with a clear, specific statement: 'Use this when you need the number of official mainland China working days in a 2024-2026 date range for an SLA, payroll, project or delivery estimate.' It names the exact resource (mainland China working days) and scope (date range), and distinguishes it from siblings like count_uk_working_days and check_china_working_day by its jurisdiction and counting behavior. Example requests further cement its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when NOT to use it: 'Do not use this when you need only elapsed calendar days, another jurisdiction, an industry-specific settlement calendar, or dates outside 2024-2026.' It also instructs the agent to call the tool directly rather than compute from memory, and provides example user requests that map to real-world use cases. This leaves no ambiguity about when it should be selected over alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources