Skip to main content
Glama
check-db.cjs•1.61 kB
#!/usr/bin/env node const sqlite3 = require('sqlite3').verbose(); const path = require('path'); const dbPath = './data/egw-writings.db'; const db = new sqlite3.Database(dbPath); console.log('šŸ” Checking database structure...'); db.all("SELECT name FROM sqlite_master WHERE type='table'", (err, tables) => { if (err) { console.error('āŒ Error:', err.message); return; } console.log('šŸ“‹ Tables found:'); tables.forEach(table => { console.log(` - ${table.name}`); }); // Check if books table exists and get sample data if (tables.some(t => t.name === 'books')) { console.log('\nšŸ“š Sample books data:'); db.all("SELECT book_id, title, author FROM books LIMIT 3", (err, rows) => { if (err) { console.error('āŒ Error querying books:', err.message); } else { rows.forEach(row => { console.log(` ${row.book_id}: ${row.title} by ${row.author}`); }); } // Check if paragraphs table exists if (tables.some(t => t.name === 'paragraphs')) { console.log('\nšŸ“ Sample paragraphs data:'); db.all("SELECT COUNT(*) as count FROM paragraphs", (err, result) => { if (err) { console.error('āŒ Error counting paragraphs:', err.message); } else { console.log(` Total paragraphs: ${result[0].count}`); } db.close(); }); } else { console.log('\nāŒ No paragraphs table found'); db.close(); } }); } else { console.log('\nāŒ No books table found'); db.close(); } });

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/pythondev-pro/egw_writings_mcp_server'

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