diff --git a/src/examples/server/simpleStreamableHttp.ts b/src/examples/server/simpleStreamableHttp.ts index 99e1bc1b..328e8715 100644 --- a/src/examples/server/simpleStreamableHttp.ts +++ b/src/examples/server/simpleStreamableHttp.ts @@ -29,21 +29,21 @@ server.tool( }, ], }; - }, - { - title: 'Greeting Tool', - readOnlyHint: true, - openWorldHint: false } ); -// Register a tool that sends multiple greetings with notifications +// Register a tool that sends multiple greetings with notifications (with annotations) server.tool( 'multi-greet', 'A tool that sends different greetings with delays between them', { name: z.string().describe('Name to greet'), }, + { + title: 'Multiple Greeting Tool', + readOnlyHint: true, + openWorldHint: false + }, async ({ name }, { sendNotification }): Promise => { const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); @@ -74,11 +74,6 @@ server.tool( } ], }; - }, - { - title: 'Multiple Greeting Tool', - readOnlyHint: true, - openWorldHint: false } );