Skip to main content
Glama

getWorkbookLinks

Retrieve available weekly CLM meeting workbook titles and RTF download links from JW.org, automatically using current month/year for the issue.

Instructions

STEP 1: Get JW.org "Our Christian Life and Ministry" (CLM) meeting workbook weeks. When a user asks for CLM workbook content, use this tool FIRST to show them available weeks. Returns weekly titles like "May 5-11 (Proverbs 12)" with their RTF download URLs. Automatically uses current month/year for the issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pubNoPublication code: "mwb" for Meeting Workbook (CLM workbook)mwb
langwrittenNoLanguage code: "E" for English, "S" for Spanish, etc.E
issueNoIssue in YYYYMM00 format. Leave empty to use current month/year automatically (e.g., "20250500" for May 2025)
fileformatNoFile format: "RTF" for Rich Text FormatRTF

Implementation Reference

  • The core handler function that fetches workbook data via fetchPublicationData, processes the file list to extract individual week RTF links (skipping ZIP), and returns structured metadata including publication name, date, issue, language, and array of weekFiles with title, URL, size, etc.
    export async function getWorkbookLinks(pub = 'mwb', langwritten = 'E', issue = null, fileformat = 'RTF') { try { const { files, pubName, formattedDate, language } = await fetchPublicationData(pub, langwritten, issue, fileformat); // Skip the first item (ZIP file) and return the individual week files const weekFiles = files.slice(1).map((file, index) => ({ title: file.title, url: file.file.url, filesize: file.filesize, track: file.track, modifiedDatetime: file.file.modifiedDatetime, checksum: file.file.checksum })); return { pubName, formattedDate, issue: issue || getCurrentIssue(), language, weekFiles }; } catch (error) { throw new Error(`Failed to fetch workbook links: ${error.message}`); } }
  • MCP tool registration definition including name, detailed usage description, and inputSchema with optional parameters (pub, langwritten, issue, fileformat) and defaults.
    { name: 'getWorkbookLinks', description: 'STEP 1: Get JW.org "Our Christian Life and Ministry" (CLM) meeting workbook weeks. When a user asks for CLM workbook content, use this tool FIRST to show them available weeks. Returns weekly titles like "May 5-11 (Proverbs 12)" with their RTF download URLs. Automatically uses current month/year for the issue.', inputSchema: { type: 'object', properties: { pub: { type: 'string', description: 'Publication code: "mwb" for Meeting Workbook (CLM workbook)', default: 'mwb' }, langwritten: { type: 'string', description: 'Language code: "E" for English, "S" for Spanish, etc.', default: 'E' }, issue: { type: 'string', description: 'Issue in YYYYMM00 format. Leave empty to use current month/year automatically (e.g., "20250500" for May 2025)' }, fileformat: { type: 'string', description: 'File format: "RTF" for Rich Text Format', default: 'RTF' } }, required: [] } },
  • Input schema for the getWorkbookLinks tool, defining object with properties pub (string, default 'mwb'), langwritten (string, default 'E'), issue (string, optional), fileformat (string, default 'RTF'), no required fields.
    inputSchema: { type: 'object', properties: { pub: { type: 'string', description: 'Publication code: "mwb" for Meeting Workbook (CLM workbook)', default: 'mwb' }, langwritten: { type: 'string', description: 'Language code: "E" for English, "S" for Spanish, etc.', default: 'E' }, issue: { type: 'string', description: 'Issue in YYYYMM00 format. Leave empty to use current month/year automatically (e.g., "20250500" for May 2025)' }, fileformat: { type: 'string', description: 'File format: "RTF" for Rich Text Format', default: 'RTF' } }, required: [] }
  • Dispatcher helper in handleWorkbookTools function that matches tool name, extracts arguments from MCP request.params.arguments, calls getWorkbookLinks, returns JSON stringified result as text content or error response.
    // Handle getWorkbookLinks tool if (request.params.name === 'getWorkbookLinks') { try { const { pub, langwritten, issue, fileformat } = request.params.arguments || {}; const result = await getWorkbookLinks(pub, langwritten, issue, fileformat); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error: ${error.message}`, }, ], isError: true, }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/advenimus/jw-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server