Skip to main content
Glama
vivek081166

japan-utils-mcp

list_holidays

Retrieve all Japanese national holidays for a specified year. Returns each holiday's date, Japanese name, and English weekday.

Instructions

List all Japanese national holidays for a given year.

Args: year: Western year (e.g. 2026).

Returns: dict with keys: - year: int - count: int - holidays: list of {date: 'YYYY-MM-DD', name_jp: str, weekday_en: str}

Examples: list_holidays(2026) → {"year": 2026, "count": 16, "holidays": [...]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual handler function for the 'list_holidays' tool. Uses jpholiday.year_holidays(year) to iterate over all national holidays in the given year, building a list of objects with date, name_jp, and weekday_en. Returns a dict with year, count, and holidays list.
    def list_holidays(year: int) -> dict[str, Any]:
        """List all Japanese national holidays for a given year.
    
        Args:
            year: Western year (e.g. 2026).
    
        Returns:
            dict with keys:
                - year: int
                - count: int
                - holidays: list of {date: 'YYYY-MM-DD', name_jp: str, weekday_en: str}
    
        Examples:
            list_holidays(2026)  →  {"year": 2026, "count": 16, "holidays": [...]}
        """
        holidays = []
        for d, name_jp in jpholiday.year_holidays(year):
            holidays.append(
                {
                    "date": d.isoformat(),
                    "name_jp": name_jp,
                    "weekday_en": [
                        "Monday",
                        "Tuesday",
                        "Wednesday",
                        "Thursday",
                        "Friday",
                        "Saturday",
                        "Sunday",
                    ][d.weekday()],
                }
            )
        return {
            "year": year,
            "count": len(holidays),
            "holidays": holidays,
        }
  • The @mcp.tool() decorator registers 'list_holidays' as an MCP tool on the FastMCP server instance.
    @mcp.tool()
    def list_holidays(year: int) -> dict[str, Any]:
  • Docstring/type annotation defines the input schema (year: int -> dict[str, Any]) and the returned dict structure with year, count, and holidays list.
    def list_holidays(year: int) -> dict[str, Any]:
        """List all Japanese national holidays for a given year.
    
        Args:
            year: Western year (e.g. 2026).
    
        Returns:
            dict with keys:
                - year: int
                - count: int
                - holidays: list of {date: 'YYYY-MM-DD', name_jp: str, weekday_en: str}
    
        Examples:
            list_holidays(2026)  →  {"year": 2026, "count": 16, "holidays": [...]}
        """
Behavior4/5

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

No annotations provided. The description fully discloses return structure and behavior via the example. No contradictions.

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?

Concise and well-structured with 'Args', 'Returns', and 'Examples' sections. Every sentence adds value.

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?

Simple tool with good coverage: explains return format and example. Could mention potential edge cases like unsupported years, but adequate overall.

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?

Schema coverage is 0%, but the description adds meaning for 'year' ('Western year (e.g. 2026)'), compensating well for the lack of schema descriptions.

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 clearly states it lists all Japanese national holidays for a given year. It distinguishes from siblings like 'is_holiday' which checks a single date.

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?

Describes the parameter and return format, but does not explicitly state when to use this tool over alternatives (e.g., 'is_holiday' for a single date). Usage is implied from example.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vivek081166/japan-utils-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server