Support old tools/call result structure, if explicitly opted in
This commit is contained in:
parent
b618157c93
commit
1f3dbef66c
1 changed files with 14 additions and 3 deletions
|
|
@ -6,6 +6,7 @@ import {
|
|||
ClientNotification,
|
||||
ClientRequest,
|
||||
ClientResult,
|
||||
CompatibilityCallToolResultSchema,
|
||||
CompleteRequest,
|
||||
CompleteResultSchema,
|
||||
EmptyResultSchema,
|
||||
|
|
@ -218,11 +219,12 @@ export class Client<
|
|||
|
||||
async callTool(
|
||||
params: CallToolRequest["params"],
|
||||
resultSchema: typeof CallToolResultSchema | typeof CompatibilityCallToolResultSchema = CallToolResultSchema,
|
||||
onprogress?: ProgressCallback,
|
||||
) {
|
||||
return this.request(
|
||||
{ method: "tools/call", params },
|
||||
CallToolResultSchema,
|
||||
resultSchema,
|
||||
onprogress,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue