Skip to main content
Glama
test-watchtower.jsβ€’1.6 kB
#!/usr/bin/env node import { getWatchtowerLinks, getWatchtowerContent } from '../src/tools/watchtower-tools.js'; async function testWatchtowerTools() { console.log('πŸ” Testing getWatchtowerLinks...'); try { // Test getWatchtowerLinks with current issue (auto-detected) const links = await getWatchtowerLinks(); console.log('βœ… getWatchtowerLinks successful!'); console.log(`πŸ“° Publication: ${links.pubName}`); console.log(`πŸ“… Date: ${links.formattedDate}`); console.log(`🌐 Language: ${links.language}`); console.log(`πŸ“„ Available articles (${links.articles.length}):`); links.articles.forEach((article, index) => { const sizeKB = (article.filesize / 1024).toFixed(1); console.log(` ${index + 1}. ${article.title}`); console.log(` URL: ${article.url}`); console.log(` Size: ${sizeKB} KB\n`); }); // Test getWatchtowerContent with first article if (links.articles.length > 0) { console.log('πŸ” Testing getWatchtowerContent with first article...'); const firstArticle = links.articles[0]; const content = await getWatchtowerContent(firstArticle.url); console.log('βœ… getWatchtowerContent 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('❌ Error:', error.message); } } testWatchtowerTools();

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