From 0044f8cb6367c61e844c5d35f1ecb0405c5b208a Mon Sep 17 00:00:00 2001 From: Brian Glass Date: Fri, 2 Oct 2026 11:12:22 -0400 Subject: [PATCH] Teach MCP clients the calendar's date conventions Expand the server instructions from one sentence into a short guide: which jurisdictions each tradition covers, New vs Old calendar, and the civil-vs-church date offset (get_day takes the civil date; search_saints returns the church month/day, 13 days behind the civil date on the Old calendar). Also covers chaining search_saints into get_day and which result fields to prefer. Also list douay-rheims in get_day's translation docs. Co-Authored-By: Claude Opus 5.5 --- mcp_svc/server.py | 43 ++++++++++++++++++++++++++++++++++++++----- mcp_svc/tools.py | 4 ++-- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/mcp_svc/server.py b/mcp_svc/server.py index 1db171ab..0850ea58 100644 --- a/mcp_svc/server.py +++ b/mcp_svc/server.py @@ -2,9 +2,42 @@ mcp = MCPServer( name='orthocal', - instructions=( - 'Look up Eastern Orthodox liturgical calendar data: feasts, fasting ' - 'rules, scripture readings, and lives of the saints for a given day, ' - 'or search for a saint by name.' - ), + instructions='''\ +Look up Eastern Orthodox liturgical calendar data: feasts, fasting rules, +scripture readings, and lives of the saints for a given day, or search for a +saint by name. + +Choosing tradition and calendar: +- tradition=slavic follows OCA/ROCOR practice; tradition=greek follows Greek + Orthodox (GOARCH) and Antiochian practice. Ask, or infer from the user's + jurisdiction, when it matters -- feasts, readings, and fasting differ. +- calendar=gregorian is the New (Revised Julian) calendar; calendar=julian is + the Old calendar used by ROCOR, most Slavic churches, Jerusalem, and Mount + Athos. Greek-tradition users are almost always on the New calendar. + +Dates: +- get_day always takes the civil (Gregorian) date the user is living on. With + calendar=julian, the year/month/day in the result are the church-calendar + (Julian) date, which is 13 days earlier -- e.g. civil January 7 returns + December 25, the Nativity. Report the civil date to the user. +- search_saints returns the fixed church-calendar month/day of each + commemoration. On the New calendar that is also the civil date. On the Old + calendar, add 13 days to get the civil date (1900-2099) before calling + get_day. Moveable feasts tied to Pascha are not found by search_saints. + +Workflow: to tell someone about a saint, call search_saints, then get_day on +the resulting civil date for the full life (in stories) and the readings. + +Reading results: +- summary_title is the best one-line name for the day. +- For fasting, combine fast_level_desc with fast_exception_desc, or use + fast_abstentions for a plain list of foods to avoid. These reflect the + strict typikon; suggest the user follow their parish or spiritual father's + guidance on local practice. +- abbreviated_reading_indices picks out the main readings (usually the + liturgy's Epistle and Gospel); use them for a short answer and the full + readings list when asked for everything. +- Each reading's passage is a list of verses; stories are HTML, so strip + markup when quoting them. +''', ) diff --git a/mcp_svc/tools.py b/mcp_svc/tools.py index 1a89779f..1b8a161f 100644 --- a/mcp_svc/tools.py +++ b/mcp_svc/tools.py @@ -23,8 +23,8 @@ async def get_day( selects Slavic (OCA/ROCOR) or Greek (Antiochian/GOARCH) practice. translation selects the Bible translation for English readings -- lxx2012-web (the default, a modern-English pairing of the Brenton - Septuagint and the World English Bible) or kjv (King James Version); - it has no effect on non-English content. + Septuagint and the World English Bible), kjv (King James Version), or + douay-rheims (Douay-Rheims); it has no effect on non-English content. """ try: