Docs / Tools reference

search_rules

Find the rules that answer a question, using only rules in force on a date.

Input

question
string, required
The rules question, in plain language.
as_of
date, default today
YYYY-MM-DD. Only rules in force on this date are searched. Dates before 24 Oct 2025 are refused: v1.0 has no known effective date.
k
integer, default 5
How many passages to return, 1 to 20.

Output

as_of, the version_in_effect on that date, the method used, and a list of passages. Each passage has:

  • ref: where the passage starts, like core@1.4:419.4.
  • rules: every rule number inside it, version-qualified.
  • version, valid_from, valid_to (empty if still current).
  • newer_version_exists: true when a later version has replaced this one.
  • text: the rule text, from your local database.

The search is always the configuration measured as best: a date filter before ranking, with the Qwen3 embedder. Configurations that were tested and dropped are not offered.

Example

{ "question": "Can an effect play a gear directly to a battlefield?", "as_of": "2026-10-01" }

Errors

  • as_of is before 2025-10-24: no datable version existed then.
  • not a date: use YYYY-MM-DD.
  • k out of range, or an empty question.
  • database unreachable, Ollama unreachable, embedder check failed, database differs from data/corpus.json: see Claude Desktop.

How good is it?

The right rule is in the top 5 for 80% (95% interval 68 to 89%) of version-change questions and 63% of expert rulings. See Results.