Skip to main content
Glama
test-workbook.jsโ€ข1.53 kB
#!/usr/bin/env node import { getWorkbookLinks, getWorkbookContent } from '../src/tools/workbook-tools.js'; async function testWorkbookTools() { console.log('๐Ÿ” Testing getWorkbookLinks...'); try { // Test getWorkbookLinks with current May 2025 issue const links = await getWorkbookLinks('mwb', 'E', '20250500', 'RTF'); console.log('โœ… getWorkbookLinks successful!'); console.log(`๐Ÿ“š Publication: ${links.pubName}`); console.log(`๐Ÿ“… Date: ${links.formattedDate}`); console.log(`๐ŸŒ Language: ${links.language}`); console.log(`๐Ÿ“„ Available weeks (${links.weekFiles.length}):`); links.weekFiles.forEach((week, index) => { console.log(` ${index + 1}. ${week.title}`); console.log(` URL: ${week.url}`); console.log(` Size: ${(week.filesize / 1024).toFixed(1)} KB`); console.log(''); }); if (links.weekFiles.length > 0) { console.log('\n๐Ÿ” Testing getWorkbookContent with first week...'); const firstWeek = links.weekFiles[0]; const content = await getWorkbookContent(firstWeek.url); console.log('โœ… getWorkbookContent successful!'); console.log(`๐Ÿ“„ Content size: ${(content.size / 1024).toFixed(1)} KB`); console.log(`๐ŸŽฏ Content type: ${content.contentType}`); console.log(`๐Ÿ“ First 200 characters:`); console.log(content.content.substring(0, 200) + '...'); } } catch (error) { console.error('โŒ Test failed:', error.message); } } testWorkbookTools();

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