MCP prompts and custom instructions for cited answers
The three ready-made prompts and the grounding-rules resource of the Quran Gallery MCP server, a system prompt for cited answers, and how to load them.
هذه الصفحة غير مترجمة بعد — تُعرض النسخة الإنجليزية.
في هذه الصفحة
Two things shape how an assistant answers from this library: what the server hands your client, and what you tell the assistant yourself. This page covers both. The server publishes three prompts and one resource. For clients that do not show them, or when you want your own wording, a system prompt below does the same job.
What the server publishes
The server answers prompts/list and resources/list (read from the live endpoint on 2026-11-01). It sends the text of each prompt when your client asks for it.
The three prompts
| Prompt | Arguments | What it asks the assistant to do |
|---|---|---|
takhrij_hadith | text (required): the hadith wording, Arabic works best, up to 2,000 characters | Locate the hadith across the hadith collections: each source, its isnad and printed page. It does not grade the hadith. |
cite_passage | text (required): the passage to source, Arabic, up to 2,000 characters | Find the book, edition and printed page a passage comes from, and cite it with a link to the page. |
compare_tafsir | surah (required): 1 to 114; ayah (required): a whole number from 1 to 286 | Compare how the major tafsir works explain one ayah, each view quoted and attributed to its author. |
A prompt is a message the server writes for you. Choosing one fills in the question and tells the assistant which tools to use and how to cite. It does not run anything by itself. The message is in English and tells the assistant to answer in your language and keep Arabic quotations in Arabic.
All three end with the same instructions: follow the grounding rules, quote only what the tools return, keep the main text apart from footnotes, give the printed volume and page and the edition data only when the tools return them, and include each sourceUrl. takhrij_hadith adds that the assistant must not state or imply a verdict on the hadith’s authenticity. The server locates sources; it does not grade them (Hadith takhrīj).
A bad argument is refused with a message that names the fix: an empty or over-long text, or a surah or ayah that is not a whole number in range.
The grounding-rules resource
The resource qurangallery://grounding-rules (name grounding-rules, Markdown) holds the citation contract: eight short rules. The same rules are explained one by one in Grounding rules. A client that supports resources can attach it to a conversation, which gives the assistant the rules in full.
A system prompt for cited answers
Paste this into your assistant’s custom instructions, project instructions or system prompt. It works with any client that connects to the server, including ones that do not show MCP prompts.
You can search a library of classical Islamic books through the Quran Gallery
MCP server. When a question needs a text, use its tools. Do not answer from
memory.
Searching
- Search queries must be in Arabic. Translate the user's terms first.
- Start with shamela_search_library and name a scope that fits the question.
Quoting and citing
- Quote only what a tool returned. Never complete a quotation, an isnad or a
reference from memory.
- Give, for every passage: the book, the author (with death year when given),
the printed volume and page, and a link to the sourceUrl.
- Give the edition, editor and publisher only when a tool returned them.
If they are missing, say they are not available. Do not guess.
- Say whether the wording is in the main text or in a footnote. If it was found
only in a footnote, say it is the editor's or commentator's note, not the
author's words.
- If the page number is Shamela's automatic numbering, say so. It is not the
printed edition's page.
When nothing is found
- Say "not found in the scope I searched" and name the scope. Do not say the
text does not exist, and do not substitute a source you remember.
Limits
- Do not grade hadith as sahih, hasan or da'if, and do not give fatwas or legal
rulings. If a source quotes a grading, report it as that source's statement,
with book and page.
- Where scholars or schools differ, present each view attributed to its holder.
Do not choose between them unless the user asks for a comparison.
Answer in the language the user writes in. Keep Arabic quotations in Arabic and
add a translation when the user does not write Arabic.Adjust the tone and length to taste, but keep the rules about quoting, footnotes, missing data and “not found”. They are what makes an answer checkable: a reader can open each sourceUrl and compare (Grounding rules).
Load them in your client
The system prompt works everywhere. The server’s own prompts and resource depend on the client:
| Client | Server prompts | Grounding-rules resource |
|---|---|---|
| Claude Code | Supported: listed as /servername:promptname, and /mcp__servername__promptname also runs one | Supported: type @ and pick it, or write @server:protocol://resource/path |
| Cursor | The documentation lists prompts as supported but does not say how to invoke one: not verified | The documentation lists resources as supported but does not say how to attach one: not verified |
| VS Code | Supported: type /<server>.<prompt> in chat | Supported: Add Context then MCP Resources, or run MCP: Browse Resources |
| Gemini CLI | Supported: a prompt becomes a slash command, with arguments as --name="value" or by position | Not documented on the MCP page: not verified |
| ChatGPT | Not verified | Not verified |
| Claude (claude.ai and Desktop) | Not verified | Not verified |
“Not verified” means the client’s documentation did not state it on the day this page was written, and we did not test it. Use the system prompt in those clients.
Claude Code
With the server added as quran-gallery (Claude Code), type / and look for the three prompts. Prompt arguments are passed space-separated after the command. Because the arguments are split on spaces, a long hadith text is easier to give in the system prompt or the chat itself. To put the system prompt in place for a project, save it in the project’s CLAUDE.md.
Cursor
Put the system prompt in a project rule or in the user rules in Cursor’s settings (Cursor). The server’s prompts are described as supported; if you do not see them, use the system prompt.
VS Code
With the server added as quran-gallery (VS Code), type /quran-gallery. in chat to list its prompts, for example /quran-gallery.compare_tafsir. For the system prompt, save it as a custom instructions file in the workspace, or paste it at the start of a chat.
Gemini CLI
With the server added (Gemini CLI), run a prompt by its name as a slash command, for example /compare_tafsir --surah=2 --ayah=255. For the system prompt, put it in a GEMINI.md file in the project folder.