Skip to main content
Glama
This connector has been deprecated

Books that contain a hadith

shamela_get_books_for_hadith
Read-onlyIdempotent

كتب تتضمَّن حديثًا

Given a Shamela hadith key (numeric identifier shared by all collections that record the same hadith), list every book that cites it. Uses Shamela's pre-built service/hadeeth.db join. By default filters to downloaded books only. Each result has book_id, book_name, author_name, page_id, downloaded flag. Pair with shamela_get_page to read the cited page. Useful for cross-collection hadith research (Bukhari + Muslim + Sunan + Musnad references for the same hadith).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hadith_keyYesNumeric hadith key (the normalized identifier Shamela uses across collections — e.g. 1234). Different collections of the same hadith share this key.
downloaded_onlyNoIf true (default), only return books actually downloaded on this machine.
response_formatNoOutput 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish the safe, idempotent read profile, so the bar is lower; the description still adds real value by naming the backing mechanism (pre-built service/hadeeth.db join), the default downloaded-only filter, the per-result fields, and the response_format character-budget caveat. It does not state ordering or empty-result behavior, but the added context is substantive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence is front-loaded and the following sentences each carry distinct information (mechanism, default filter, result shape, pairing). Some overlap with the schema's own hadith_key explanation is the only redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by enumerating the result fields (book_id, book_name, author_name, page_id, downloaded flag). Combined with the downloaded_only default and the shamela_get_page handoff, an agent has enough to call it correctly; only result ordering and empty-case behavior are unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter carries a detailed description, including the response_format capability requirement, so the schema does the heavy lifting. The description restates that hadith_key is a shared numeric identifier but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ("list every book that cites" a given hadith key) and explains the underlying join, so the agent knows exactly what comes back. It pairs explicitly with shamela_get_page, but never contrasts itself with the close sibling shamela_search_hadith, which an agent might otherwise reach for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied rather than stated: "Useful for cross-collection hadith research" sketches a scenario, and the downloaded_only default is disclosed. There is no explicit when-to-use-this-vs-shamela_search_hadith routing, which matters given a sibling with overlapping hadith scope.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources