Skip to content

Commit 487013b

Browse files
committed
Fix example to properly position tool annotations
1 parent aaf04c8 commit 487013b

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
@@ -27,21 +27,21 @@ server.tool(
2727
},
2828
],
2929
};
30-
},
31-
{
32-
title: 'Greeting Tool',
33-
readOnlyHint: true,
34-
openWorldHint: false
3530
}
3631
);
3732

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

@@ -72,11 +72,6 @@ server.tool(
7272
}
7373
],
7474
};
75-
},
76-
{
77-
title: 'Multiple Greeting Tool',
78-
readOnlyHint: true,
79-
openWorldHint: false
8075
}
8176
);
8277

0 commit comments

Comments
 (0)