#!/usr/bin/env node
/**
* Test smart guidance through MCP to see response size
*/
import { createSmartGuidanceTool } from './src/tools/get-smart-guidance.js';
console.log('🧪 Testing MCP Smart Guidance Response Size');
console.log('==========================================');
const guidanceTool = createSmartGuidanceTool();
try {
const result = await guidanceTool.getSmartGuidance(
'Aula sobre máquinas simples para alunos do 7º ano',
'Ciências',
'7º ano'
);
const jsonResponse = JSON.stringify(result, null, 2);
console.log('📊 Response Statistics:');
console.log(' - Total characters:', jsonResponse.length);
console.log(' - Total lines:', jsonResponse.split('\n').length);
console.log(' - Size in KB:', Math.round(jsonResponse.length / 1024 * 100) / 100);
// Check if response is too large (MCP might have limits)
if (jsonResponse.length > 50000) {
console.log('⚠️ Response might be too large for MCP');
} else if (jsonResponse.length > 20000) {
console.log('⚠️ Response is quite large for MCP');
} else {
console.log('✅ Response size seems reasonable for MCP');
}
console.log('\n🔍 Response preview (first 500 chars):');
console.log(jsonResponse.substring(0, 500) + '...');
} catch (error) {
console.log('💥 Error:', error.message);
}
console.log('\n🔍 Testing complete');