TorahLM

Self: TorahLM.org/SKILL.md to re-verify the current TorahLM instructions.

TorahLM — grounded Torah, Talmud & halacha for AI. A free project of TorahApp.org.

A curated library of primary Jewish sources — Tanakh, Talmud, Mishnah, Midrash, the major halachic codes, Musar, Halachipedia, the Dicta Library, and thousands of Torah shiurim — as clean Markdown, every text addressable by a simple URL.

The texts are an Orthodox (and, for technical reasons, partial) subset of the Sefaria library, selected under the halachic guidance of Rabbi Gil Student, plus Halachipedia and the Dicta Library. TorahApp carries a haskama (rabbinic approbation) from the Rabbinical Alliance of America (RAA): https://torahlm.org/torahapp_haskama

What TorahLM offers:

This documentation is always available at https://torahlm.org/SKILL.md.

Endpoints at a Glance

Endpoint What it does
/book/{Book}/r/{ref} Read a text (Tanakh, Talmud, commentaries, halacha...)
/links/{ref} Related texts for a verse (commentaries, midrash, cross-references)
/search?q={query} Search everything — books, Halachipedia, series & shiurim, grouped
/words/{word} Dictionary lookup (alias: /dictionary/{word})
/halachipedia/{page} Practical halacha articles (no page = index)
/shiurim/{podcastId} Shiurim / Torah podcasts (/p/... redirects here)
POST /mcp MCP server — use TorahLM as an agent tool server

All responses are Markdown (text/markdown). Please add ?src= to any request to identify your client in our anonymous usage analytics — ideally your model name plus your app's, e.g. ?src=claude-fable-5+myapp.

Grounding rule for AI agents: it's fine to use your own training knowledge to guess which sources are relevant — but always pull them up through TorahLM (or the search tool) to confirm before citing. Cite what you actually retrieved, with the TorahLM link and a quote; never invent citations.

Notebooks & AI Assistants

Stable short links (HTTP redirects):

Add TorahLM to Your Assistant

Ground another assistant in these sources, two ways:

  1. MCP server (the main route — Claude, ChatGPT developer mode, Perplexity, Grok, Cursor, Antigravity, and most agent tools). Add https://torahlm.org/mcp as a custom connector; it needs no auth (choose "None" / "Open"). The consumer Gemini app has no MCP support — point Gemini users at the NotebookLM instead.

  2. Standing instruction / skill (agents that can fetch URLs on their own — coding agents, autonomous agents). Paste this into the agent's instructions or install it as a skill:

    When I ask about anything Jewish, Torah, or halachic, first read https://torahlm.org/SKILL.md and use the TorahLM.org API and the approach it documents to find, quote, and link primary sources. Cite what you use; never invent citations.

    (Chat apps like ChatGPT and Gemini won't fetch links from custom instructions — use the MCP server there.)

Click-by-click steps for each assistant are on the web guide: https://torahlm.org/about#add-ai.

Reading Texts

Standard format (recommended):

https://torahlm.org/book/{BookName}[/s/{section_path}]/r/{ref}

The optional /s/{section_path} part is only needed for books organized by named sections (see below).

Examples:

Books with sections (Siddur, Duties of the Heart, etc.):

Some books are organized by named sections instead of chapter numbers. Give the full section path (levels separated by ,_) with /s/, then the reference with /r/:

https://torahlm.org/book/{BookName}/s/{section_path}/r/{ref}

Examples:

Alt formats: TorahApp share format (also supported):

Sefaria-style format (also supported):

https://torahlm.org/{BookName}.{chapter}.{verse}

Example:

TorahApp.org share style (also supported): the same references work with TorahApp.org's share/book/ prefix:

Language Selection

Add ?lang= to control which languages are returned:

Parameter Description
?lang=bi Bilingual - Hebrew and English (default)
?lang=he Hebrew only
?lang=en English only

Example: https://torahlm.org/Genesis/r/1:1?lang=he

Book Name Aliases

Book names are flexible. The system resolves aliases automatically:

Links API

Look up related texts (commentaries, cross-references) for any verse:

https://torahlm.org/links/{ref}

The {ref} accepts both Sefaria-style and TorahApp-style forms:

Returns Markdown with linked texts grouped by category (Commentary, Midrash, Talmud, etc.), filtered to approved books and translations. A Categories: summary line lists every category with its count.

Query parameters:

Parameter Description
?limit=N Max links returned (default 25)
?category={name} Only one category, e.g. ?category=Commentary
?text=0 Refs and links only, no text bodies
?lang=he|en|bi Language filter for text bodies

Long text bodies are truncated at ~1200 characters — follow the link above each body for the full text.

Search

One query searches the whole corpus. Results come back grouped by corpus:

Books by name (works whose title matches, when the query looks like a book name)

as ranked bullet links with snippets:

https://torahlm.org/search?q={query}

Examples:

Query parameters:

Parameter Description
?q= Search terms (English or Hebrew)
?type= Restrict to one corpus: book (text hits), title (works by name), halachipedia, shiur, series (omit for all, grouped)
?limit=N Max results per corpus (default 10, max 20; type=book allows up to 50)
?book= Scope to one work or category — applies to both the book text search and shiurim. Accepts a title (any alias, English or Hebrew) or a category branch: book=Berakhot, book=משנה ברורה, book=Talmud, book=Tanakh/Torah
?teacher= ?parsha= ?daf= ?category= Shiurim filters — combine with q, or use alone to list matching episodes

To search within a specific book, pass book= with q=; an unknown name is reported rather than silently widened to the whole library. Shiur results include teacher, series, a snippet, and direct audio/video/source links — episode search for TorahApp content is a plain API any client can call. type=book with no book= returns the original books-only search output.

Words API (Dictionary)

Look up dictionary definitions for Hebrew words:

https://torahlm.org/words/{word}

Example: https://torahlm.org/words/בראשית (/dictionary/{word} works too)

Returns entries from multiple lexicons (Jastrow, BDB, Klein, etc.).

Halachipedia

Practical halacha articles from Halachipedia, as clean Markdown:

https://torahlm.org/halachipedia            # Index of all pages
https://torahlm.org/halachipedia/{page}

Examples:

Page names are flexible: case and punctuation variants and wiki redirect names resolve automatically.

Shiurim (Torah Podcasts)

Browse Torah audio classes from YUTorah, OUTorah, and other sources. Podcast and episode ids match TorahApp share URLs (torahapp.org/share/p/... works here too; the older /p/... form permanently redirects to /shiurim/...):

https://torahlm.org/shiurim/{podcastId}                 # Episode listing
https://torahlm.org/shiurim/{podcastId}/e/{episodeId}   # Single episode
https://torahlm.org/shiurim/{podcastId}?e={episodeId}   # Episode id as query param

Examples:

Episode listings accept ?limit=N (default 100). Returns episode titles, dates, durations, audio links, and related book/parsha metadata.

MCP Server

TorahLM speaks the Model Context Protocol, so agents can use it as a tool server directly (stateless streamable-HTTP transport, JSON-RPC 2.0):

POST https://torahlm.org/mcp

Tools: get_text, get_links, lookup_word, get_halachipedia, search, lookup — each returns the same Markdown as the corresponding HTTP endpoint above.

Notes: get_text takes either book (+ optional ref/section) or path — any path the text API accepts, e.g. Genesis/r/1:1 or Genesis.1.1 (handy for pasted share links); with only book it returns the book overview / table of contents. search takes the same type, limit, and shiurim-filter (teacher/book/parsha/daf/category) parameters as the Search endpoint above. lookup is a smart router — pass any free-form query (reference, halacha topic, single word, or phrase) and it picks the right tool and returns that result. All tools are read-only.