Assert tool request handlers do not already exist
This commit is contained in:
parent
f8f5686966
commit
4bf5c5358a
1 changed files with 12 additions and 1 deletions
|
|
@ -343,7 +343,9 @@ export class Server<
|
|||
}
|
||||
|
||||
private setToolRequestHandlers() {
|
||||
// TODO: Check that these handlers do not already exist
|
||||
this.assertCanSetRequestHandler(ListToolsRequestSchema.shape.method.value);
|
||||
this.assertCanSetRequestHandler(CallToolRequestSchema.shape.method.value);
|
||||
|
||||
// TODO: Register tool capability
|
||||
|
||||
this.setRequestHandler(ListToolsRequestSchema, (): ListToolsResult => ({
|
||||
|
|
|
|||
Loading…
Reference in a new issue