Identify a cited work
shamela_resolve_workتحديد الكتاب المُحال إليه
Resolve a CITED work — title, optional author, optional edition — to the catalogue entry it names, or refuse. Use this instead of shamela_resolve whenever a citation is being verified: shamela_resolve RANKS, and a ranking always produces a winner, so an ambiguous request comes back as a confident wrong answer. Three guarantees. (1) The requested title must be a PREFIX of the candidate's title: «شرح صحيح البخاري», «المدخل إلى صحيح البخاري» and «عمدة القاري شرح صحيح البخاري» all contain the work's name and none of them IS the work — a commentary is another author writing about it, and quoting one as the work attributes his words to al-Bukhari. (2) author is a FILTER, not a hint: a candidate whose author cannot be reconciled with it is rejected and listed in rejected[], never ranked down. (3) A requested edition that no entry carries returns status='not_found' with reason='edition_not_found' plus available_editions[] — never a different book. status is 'exact' (one entry, in match), 'ambiguous' (several — ambiguity:'edition' means one work in several printings, so pass every book_id as one scope; ambiguity:'work' means DIFFERENT books, and nothing may choose between them: «المغني» is al-Dhahabi's book of weak narrators and Ibn Qudama's fiqh), or 'not_found'. Catalogue-only, no index, no library read. Examples: shamela_resolve_work({title:'صحيح البخاري - ط السلطانية'}), shamela_resolve_work({title:'المغني', author:'ابن قدامة'}).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum candidates to report (1-50, default 20). | |
| title | Yes | The work's title as cited, e.g. «صحيح البخاري», «المغني», «فتح الباري». Leading words only — the title, not a description of it. You may include the catalogue's own edition tail, with the « - » («صحيح البخاري - ط السلطانية») or without it («مسند أحمد ط الرسالة»), and it will be read as `edition`. An author name appended instead («صحيح البخاري محمد بن إسماعيل البخاري», «الهداية للمرغيناني») is read as `author`. Where a title is held by more than one author, a trailing edition is NOT read as one until you also pass `author` — «صحيح البخاري ت البغا» alone is refused, «صحيح البخاري ت البغا» + author «البخاري» resolves. | |
| author | No | The author as cited, when known. This is a FILTER, not a hint: a candidate whose author cannot be reconciled with it is rejected rather than ranked down, because that is exactly how a commentary gets returned as the work it comments on. | |
| edition | No | A specific printing, as the catalogue names it: 'ط السلطانية', 'ت البغا', 'ط التأصيل'. If no entry carries it you get status='not_found' with reason='edition_not_found' and the editions that DO exist — never a different book. | |
| response_format | No | Output format for the human-readable text. 'markdown' (default) is best for direct display; 'json' returns the same data as a single JSON code block; 'none' skips the rendered text entirely and returns a one-line pointer, leaving `structuredContent` as the whole answer. The structured data is returned in `structuredContent` regardless of this setting, so a caller that parses it should pass 'none' — the character budget is measured over BOTH channels, and the unread copy is otherwise spending most of it. Requires the 'response_format.none' capability (see shamela_brief). | markdown |