Skip to main content
Glama

Convert a date to the Japanese era (wareki) / 西暦から和暦

to_japanese_era
Read-onlyIdempotent

Convert a Gregorian date (YYYY-MM-DD) to the Japanese era calendar, e.g. 2026-10-07 → 令和8年10月7日 (wareki_short R8.10.07, zero-padded). Year 1 is written 元年. Supported from 1873-01-01 (the Gregorian calendar was adopted on 明治6年1月1日). Eras: 令和 (R) from 2019-05-01, 平成 (H) from 1989-01-08, 昭和 (S) from 1926-12-25, 大正 (T) from 1912-07-30, 明治 (M) from 1868-01-25. flags: assumes_current_era for dates after today (the era might change). / 西暦の日付を和暦にする。1年目は「元年」。明治6年(1873年)1月1日から。今日より後の日付には assumes_current_era。

Input Schema

NameRequiredDescriptionDefault
dateYesDate (YYYY-MM-DD) / 日付

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

The annotations already establish this as a read-only, idempotent, closed-world operation. The description goes much further, disclosing the supported date range, all era boundary dates, the 元年 convention for year 1, the zero-padded output format, and the assumes_current_era flag for future dates. This is rich behavioral context beyond annotations.

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 conversion and an example, then packs in constraints and flags efficiently. It is somewhat longer than necessary because the Japanese translation duplicates much of the English content, but every English sentence contributes useful information.

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?

Given one simple parameter, no output schema, and rich annotations, the description is complete. It explains what the tool returns through format examples, covers valid date range, era mapping, edge cases, and the future-date flag, leaving no material gap for correct invocation.

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?

The schema has 100% description coverage for the single date parameter, but the description adds meaningful semantic constraints beyond the regex pattern, notably that supported dates begin at 1873-01-01 and that dates after today may carry era-change uncertainty. It also clarifies the expected Gregorian format with a concrete example.

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 states a precise verb and resource: converting a Gregorian date to the Japanese era calendar. It distinguishes itself from the inverse tool by explicitly naming the input and output direction (2026-10-07 → 令和8年10月7日), and the output format examples make the purpose unambiguous.

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 description gives useful domain constraints such as the supported range starting 1873-01-01 and the future-date caveat via assumes_current_era, but it never explicitly says when to choose this over from_japanese_era or other date tools. Usage is implied by the tool's conversion purpose rather than stated.

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