list_hadith_collections
Discover available Hadith collections to access Islamic traditions and teachings for research, study, or daily guidance.
Instructions
List all available Hadith collections.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/hadith.ts:100-106 (handler)The core handler function that implements the tool logic by returning a list of available Hadith collections with their slugs, names, and total hadith counts.export function listHadithCollections() { return HADITH_COLLECTIONS.map(collection => ({ slug: collection.slug, name: collection.name, totalHadiths: collection.totalHadiths, })); }
- The MCP tool definition including name, description, and empty input schema (no parameters required).{ name: 'list_hadith_collections', description: 'List all available Hadith collections.', inputSchema: { type: 'object', properties: {}, }, },
- src/shared/tool-executor.ts:103-105 (registration)The dispatch/registration in the tool executor switch statement that calls the handler function.case 'list_hadith_collections': { result = listHadithCollections(); break;
- src/shared/tool-executor.ts:8-8 (registration)Import statement registering the listHadithCollections handler for use in the executor.import { getHadith, getRandomHadith, listHadithCollections } from '../tools/hadith.js';