Enhance terminal output with descriptive logging and formatting

This commit is contained in:
jango-blockchained
2024-12-17 15:29:39 +01:00
parent afe9b296bb
commit ce4e92502a

View File

@@ -221,7 +221,20 @@ async function main() {
// Start the server
await server.start();
console.log('MCP Server started');
console.log('MCP Server started successfully and is ready to accept commands.');
// Add more detailed logging for server actions
server.on('toolAdded', (tool) => {
console.log(`Tool added: ${tool.name} - ${tool.description}`);
});
server.on('toolExecuted', (tool, result) => {
console.log(`Tool executed: ${tool.name} - Result: ${result.success ? 'Success' : 'Failure'}`);
if (!result.success) {
console.error(`Error: ${result.message}`);
}
});
console.log('Listening for incoming connections...');
}
main().catch(console.error);