test-mcp-guidance.jsโข1.38 kB
#!/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');