Skip to main content
Glama
jalali-calendar-mcp

jalali-calendar-mcp

Count workdays

count_workdays
Read-onlyIdempotent

Count workdays between two dates, inclusive, excluding Fridays and official Iranian holidays; accepts Gregorian or Jalali dates.

Instructions

Count the days from start to end (both included) that are not Fridays or official holidays. Thursdays count as workdays. Not a legal deadline calculator: legal periods have their own rules.

Args: start: First day, Gregorian YYYY-MM-DD or Jalali YYYY/MM/DD. end: Last day, same formats (at most ten years after start).

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": {
      "start": "<start>",
      "end": "<end>"
    },
    "name": "count_workdays"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYes
startYes

Output Schema

NameRequiredDescriptionDefault
endYes
daysYesCalendar days in the range, both ends included.
startYes
days_offYesThe Fridays and holidays in the range.
workdaysYesDays that are neither a Friday nor an official holiday.
estimatedYesTrue when an estimated lunar holiday affected the count.
end_jalaliYes
start_jalaliYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.3/5.0
Behavior4/5

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

Adds real behavioral context beyond the readOnly/idempotent/closed-world annotations: inclusive boundaries, the specific exclusion set, and the ten-year window. However, 'official holidays' is never qualified with a calendar or locale, so an agent cannot tell whose holidays are counted, which materially affects interpreting the result.

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?

Front-loaded with the core rule in the first sentence, followed by a scoping caveat and a compact Args block; nothing is padding. The standalone sentence 'Thursdays count as workdays' is slightly redundant given the Friday exclusion, but it usefully guards against the common Thursday-weekend assumption.

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?

An output schema exists, so the return value need not be described, and both required parameters are documented with formats and limits. The remaining omission is the holiday calendar source, which matters for a counting tool but is arguably fixed server-side rather than caller-controlled.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the Args block carries the whole burden and does so: start is the first day, end the last day, both accepting Gregorian YYYY-MM-DD or Jalali YYYY/MM/DD, and end must be at most ten years after start. The only gap is that the ten-year bound is a hard constraint stated without saying what happens when violated.

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 (count) and resource (days between start and end) plus the exact inclusion rules: both endpoints included, Fridays and official holidays excluded. This is immediately distinguishable from siblings like is_holiday, get_holidays, or convert_date, which operate on single dates or calendars.

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?

Gives an explicit when-not: it is not a legal deadline calculator, and legal periods have their own rules. That exclusion is genuinely useful for routing. It stops short of naming the sibling to use for date conversion or holiday lookup, so the guidance is clear but not fully comparative.

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