Skip to main content
Glama

Dad Joke Visualizer

by rudedoggg
test-image-generation.js•1.68 kB
#!/usr/bin/env node /** * Test script to show you how to get actual images from the Dad Joke Visualizer */ import { generateDadJoke } from './dist/tools/jokeGenerator.js'; import { generateImage } from './dist/tools/imageGenerator.js'; async function testImageGeneration() { console.log('šŸŽ­ Testing Actual Image Generation...\n'); try { // Generate a real dad joke console.log('1ļøāƒ£ Generating Dad Joke...'); const joke = await generateDadJoke('programming', 'PG-13'); console.log(`āœ… Joke: "${joke}"\n`); // Generate the actual image console.log('2ļøāƒ£ Generating Image with Multi-Tier Fallback...'); const imageUrl = await generateImage(joke, 'programming', 'PG-13'); console.log(`āœ… Image URL: ${imageUrl}\n`); // Show you how to access the image console.log('šŸŽÆ HOW TO VIEW YOUR ACTUAL IMAGE:'); console.log('─'.repeat(50)); if (imageUrl.startsWith('data:')) { console.log('šŸ“„ This is an SVG data URL - copy the entire URL below and paste into your browser:'); console.log(`šŸ”— ${imageUrl}`); } else { console.log('šŸ“„ This is an external image URL - click the link below to view:'); console.log(`šŸ”— ${imageUrl}`); } console.log('\nšŸ’” ALTERNATIVE METHODS:'); console.log('1. Copy the URL above and paste into browser address bar'); console.log('2. Right-click and "Save Image As" to download'); console.log('3. Use the web interface at http://localhost:3000'); console.log('4. Check individual joke pages at /joke/[id]'); } catch (error) { console.error('āŒ Error:', error.message); } } testImageGeneration();

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/rudedoggg/DadJokeVisualizer'

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