update examples, update package-lock.json

This commit is contained in:
Basil Hosmer 2025-05-13 16:32:22 -04:00
commit e1abdab7f5
No known key found for this signature in database

View file

@ -341,19 +341,13 @@ async function callTool(name: string, args: Record<string, unknown>): Promise<vo
});
console.log('Tool result:');
if (result.content) {
result.content.forEach(item => {
if (item.type === 'text') {
console.log(` ${item.text}`);
} else {
console.log(` ${item.type} content:`, item);
}
});
} else if (result.structuredContent) {
console.log(` Structured content: ${result.structuredContent}`);
} else {
console.log(' No content returned');
}
result.content?.forEach(item => {
if (item.type === 'text') {
console.log(` ${item.text}`);
} else {
console.log(` ${item.type} content:`, item);
}
});
} catch (error) {
console.log(`Error calling tool ${name}: ${error}`);
}