Skip to main content
Glama

Hijri ⇄ Gregorian converter

calc_hijri
Read-onlyIdempotent

Convert dates between Gregorian and Hijri using the Umm al-Qura calendar. Calculate Hijri age, next birthday, or month length, with results in English and Arabic.

Instructions

Convert between Gregorian and Hijri dates with the Umm al-Qura calendar (the same Intl calendar the website uses), both ways. Modes: to_hijri (a Gregorian date), to_gregorian (Hijri year, month 1–12, day), month (length of a Hijri month and its Gregorian start/end), age (age in Hijri and Gregorian years, next Hijri birthday). Results come in English and Arabic (Arabic-Indic digits by default; Gregorian month names in the Egyptian/Gulf or Levant style). Supported range 1300–1600 AH (1882–2174). Web version: https://s3eidat.github.io/hijri-converter/

Input Schema

NameRequiredDescriptionDefault
dateNoto_hijri: Gregorian date YYYY-MM-DD (default today).
modeYesWhich conversion.
onDateNoage: age on this Gregorian date (default today).
hijriDayNoto_gregorian: Hijri day 1–30.
birthDateNoage: Gregorian date of birth YYYY-MM-DD.
hijriYearNoto_gregorian / month: Hijri year (1300–1600).
hijriMonthNoto_gregorian / month: Hijri month 1–12 (1 = Muharram, 9 = Ramadan).
arabicDigitsNoUse Arabic-Indic digits in the Arabic text.
gregorianArabicMonthsNoArabic Gregorian month names: intl (Egypt/Gulf style, January = Yanayir) or levant (Syria/Jordan style, January = Kanun al-Thani).intl

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavior: the supported 1300–1600 AH range and that output is bilingual with Arabic-Indic digits and regional Gregorian month styles. It says nothing about what happens for out-of-range or invalid dates, nor about the exact shape of returned results for a tool with four distinct modes.

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 purpose, then a compact mode enumeration and the constraints. Dense parentheticals earn their place as disambiguation, though the trailing web-version URL adds nothing an agent can act on.

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?

With no output schema, the description does the work of hinting at returns per mode (month length plus Gregorian start/end; Hijri and Gregorian ages plus next Hijri birthday; bilingual output). That is close to complete for a read-only converter; only exact field names/shapes and error behavior remain unspecified.

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% and the per-mode parameter docs (date, hijriYear 1300–1600, hijriMonth 1–12 with Ramadan noted, birthDate, onDate) already carry the semantics. The description largely repeats that ground: the range 1300–1600 AH appears in the schema too, and the Arabic-Indic/Levant options duplicate the enum descriptions. Baseline 3 is right.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Convert between Gregorian and Hijri dates' with the Umm al-Qura calendar) and enumerates the four operating modes, so the agent knows exactly what the tool does. It does not, however, differentiate itself from nearby siblings such as calc_age or time_convert, even though it contains an 'age' mode that overlaps with calc_age.

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?

The mode list effectively tells the agent which inputs select which operation (to_hijri takes a Gregorian date, to_gregorian needs Hijri y/m/d, month reports a Hijri month's length and boundaries, age needs a birthDate). There are no explicit 'use this instead of X' exclusions or prerequisites, so it stops short of a 5.

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

Deploy Server

Other Tools