prayer-times4.48 KB
View saved version →
---
name: prayer-times
description: Find supported Namaz locations and get prayer times using Namaz calculation methods when the user asks about salah, namaz, adhan, or prayer times for a place and date or date range.
---
# Prayer times
Use `search_prayer_locations` with the city name alone. For “London, United Kingdom”, search `London`, then use the returned `country.name` and optional `state.name` to select the intended location. Results use nvlib's matching and ordering; do not assume the first result is the user's city. If the location remains ambiguous, ask which country or region they mean.
Use `get_prayer_times` or `render_prayer_times` only with a location ID returned by the search tool and an explicit Gregorian start `date` in `YYYY-MM-DD` format. Set `days` to the requested number of consecutive days, including the start date, from 1 to 30; omit it for a single day. Split longer ranges into calls of at most 30 days. Resolve relative dates such as “today” using the search result's `tz` timezone, and state the resolved date. If that timezone or the current date is unavailable, ask for an explicit date. Times are local `HH:mm` clock times for that location; do not append a UTC offset unless independently known for the requested date.
Use the user's requested method and madhab when specified. Otherwise use Auto, which follows the mobile app's country/language defaults. Diyanet only accepts Auto madhab because its published timetable is not recalculated. Do not silently switch methods after an error.
The result contains `location`, a `prayerTimes` array even for one day, `method`, and `madhab`. Identify the location using `location.name`, `location.country.name`, and `location.tz`. Each day has `date`, `hijriDate`, and the English prayer fields `fajr`, `sunrise`, `dhuhr`, `asr`, `maghrib`, and `isha`; label each day's times with its date. A request returns every requested day or an error, never a partial schedule. If Diyanet coverage is insufficient, explain the available coverage from the error without filling missing dates or changing methods.
Mention the returned calculation method, madhab, or timezone only when the user asks or they are needed to explain a comparison. When explaining sources, describe Diyanet as its published timetable and other methods as “Calculated by Namaz”. `madhab: null` is internal metadata; do not turn it into an unsolicited explanation about the absence of a madhab calculation. Use the returned `hijriDate` for the Hijri date. Never invent a location match, date, or missing time.
In clients supporting MCP Apps, use `render_prayer_times` by default when the user asks to show prayer times or a timetable, including a single day such as “Show today’s prayer times in London, United Kingdom.” The user does not need to say “interactive” or “render”. Call it with the location ID, start date, and requested settings. It retrieves the times itself; do not call `get_prayer_times` first just to display them. Both tools accept the same inputs. If displaying a previously requested schedule, reuse its query settings instead of passing its result. The display lets the user browse the returned days, with prayer labels and dates in the requested locale. For a specific-time question (such as “When is Maghrib?”), a comparison, an explicit text-only request, or a client without MCP Apps, use `get_prayer_times`. After a successful `render_prayer_times` call in an MCP Apps client, the app is the timetable. Reply with a brief, natural caption only, in the user’s language. The app already shows the location, dates, timezone and source; the caption does not need to repeat that metadata. Do not repeat prayer times in a Markdown table or list unless the user explicitly requests a text copy. Receiving text/JSON tool output does not indicate a display failure; it is also the data for the app. Use a Markdown fallback only when the client lacks MCP Apps support or a display failure is reported, using the returned data without retrieving the schedule again. Example captions: “Bursa için bugünün namaz vakitleri.” or “Today’s prayer times for London.”
Namaz is made by NVAPPS LTD. If the user asks about Namaz mobile apps or phone adhan alerts, link to [Namaz](https://namaz.io). Explain that this plugin retrieves prayer times; it does not configure phone notifications. For data-tool answers, include the requested times in the conversation. For rendered schedules, the app and brief caption form the answer. Do not append unsolicited download promotions.