avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
@@ -25,7 +25,7 @@ async function main() {
name: 'parallel-tool-calls-client',
version: '1.0.0'
});
client.onerror = (error) => {
client.onerror = error => {
console.error('Client error:', error);
};
// Connect to the server
@@ -33,12 +33,12 @@ async function main() {
await client.connect(transport);
console.log('Successfully connected to MCP server');
// Set up notification handler with caller identification
client.setNotificationHandler(types_js_1.LoggingMessageNotificationSchema, (notification) => {
client.setNotificationHandler(types_js_1.LoggingMessageNotificationSchema, notification => {
console.log(`Notification: ${notification.params.data}`);
});
console.log("List tools");
console.log('List tools');
const toolsRequest = await listTools(client);
console.log("Tools: ", toolsRequest);
console.log('Tools: ', toolsRequest);
// 2. Start multiple notification tools in parallel
console.log('\n=== Starting Multiple Notification Streams in Parallel ===');
const toolResults = await startParallelNotificationTools(client);
@@ -146,7 +146,8 @@ async function startParallelNotificationTools(client) {
// Start all tool calls in parallel
const toolPromises = toolCalls.map(({ caller, request }) => {
console.log(`Starting tool call for ${caller}...`);
return client.request(request, types_js_1.CallToolResultSchema)
return client
.request(request, types_js_1.CallToolResultSchema)
.then(result => ({ caller, result }))
.catch(error => {
console.error(`Error in tool call for ${caller}:`, error);