Skip to main content
Glama

PlugRail Japanese Calendar

business_days_between

Read-onlyIdempotent

from〜to間の営業日数を数えます。既定では「fromを含まず、toを含む」境界です(例:「今日から支払期日まで何営業日か」)。include_from/include_toで境界を変更できます。土日・日本の祝日を除外し、calendar="banking"を指定すると銀行休業日(12/31〜1/3)も除外します。from > to の場合はエラーにせず、from/toとinclude_from/include_toを入れ替えて計算した結果の符号を反転した値(負の営業日数)を返します(反対称則: count(A,B,x,y) = -count(B,A,y,x)。A≠B、すなわちfrom≠toの場合に成立する恒等式で、from===toはこの分岐に入らないため対象外)。入力例: {"from": "2026-07-10", "to": "2026-07-20"}

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "business_days_between"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes終点日 YYYY-MM-DD。例: "2026-07-20"。fromより前の日付も指定可(結果は負の営業日数になります)。
fromYes起点日 YYYY-MM-DD。例: "2026-07-10"。
calendarNo"standard"(既定)または"banking"(銀行休業日も除外)。
include_toNotoを営業日数に含めるか。既定はtrue。
include_fromNofromを営業日数に含めるか。既定はfalse。
extra_closed_datesNo顧客固有の追加休業日(YYYY-MM-DD の配列)。例: ["2026-12-29", "2026-12-30"]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changed
    • changedInput schema / properties / to / description
      Previous value: -"終点日 YYYY-MM-DD。例: \"2026-07-20\"。fromより前の日付は不可。"New value: +"終点日 YYYY-MM-DD。例: \"2026-07-20\"。fromより前の日付も指定可(結果は負の営業日数になります)。"
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already establish the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false, openWorldHint=false), but the description adds valuable behavioral detail of its own: how the default boundary is set (exclude `from`, include `to`), how holidays are excluded, and that `from > to` returns a negative count instead of an error are all disclosed here. The antisymmetry identity is explained in far more detail than an agent needs, and the parenthetical about `from===to` is noise; without it, this would be a clean 5.

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?

The description is front-loaded with the core purpose and the default boundary before it moves to options, and the input example is placed close to the end. The long parenthetical defining the antisymmetry identity, including the exception for from===to, is over-explained for tool selection and could be cut.

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 six-parameter read-only computation with no output schema and full schema coverage, the description supplies what remains necessary: the definition of a business day (weekdays plus Japanese holidays), how the boundary flags combine, and what the return value looks like, including its sign when the range is reversed. Nothing an agent needs in order to call this correctly is missing.

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%, so the schema already documents every parameter, including the defaults for include_from (false) and include_to (true) and the meaning of calendar="banking". The description restates those defaults as a combined boundary rule, which helps with how they interact, but it adds no format or fallback detail beyond what the schema provides. A baseline of 3 is correct.

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 specific verb+resource pair, 'from〜to間の営業日数を数えます', and elaborates on scope: weekend/Japanese-holiday exclusion, banking-calendar mode, and boundary defaults. It is clear that this tool counts days rather than adding them or checking holiday status, which is enough to separate it from the sibling tools add_business_days, is_holiday, and list_holidays.

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?

It gives concrete contexts for use, including the example '今日から支払期日まで何営業日か' and the reason to choose calendar="banking" (excluding 12/31〜1/3). It does not explicitly say which sibling tool is the right alternative when the user wants to add days or test a single date, and it states no exclusions, so it stops short of a full when-to-use/when-not-to-use guide.

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.