Skip to content

Commit c5e81ad

Browse files
committed
Fix example to properly position tool annotations
1 parent 0096be4 commit c5e81ad

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/examples/server/simpleStreamableHttp.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ server.tool(
2929
},
3030
],
3131
};
32-
},
33-
{
34-
title: 'Greeting Tool',
35-
readOnlyHint: true,
36-
openWorldHint: false
3732
}
3833
);
3934

40-
// Register a tool that sends multiple greetings with notifications
35+
// Register a tool that sends multiple greetings with notifications (with annotations)
4136
server.tool(
4237
'multi-greet',
4338
'A tool that sends different greetings with delays between them',
4439
{
4540
name: z.string().describe('Name to greet'),
4641
},
42+
{
43+
title: 'Multiple Greeting Tool',
44+
readOnlyHint: true,
45+
openWorldHint: false
46+
},
4747
async ({ name }, { sendNotification }): Promise<CallToolResult> => {
4848
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
4949

@@ -74,11 +74,6 @@ server.tool(
7474
}
7575
],
7676
};
77-
},
78-
{
79-
title: 'Multiple Greeting Tool',
80-
readOnlyHint: true,
81-
openWorldHint: false
8277
}
8378
);
8479

0 commit comments

Comments
 (0)