Skip to content

Commit e911ece

Browse files
committed
Remove CompatibilityCallToolResult
Resolves #82.
1 parent becd787 commit e911ece

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/client/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
ClientNotification,
1212
ClientRequest,
1313
ClientResult,
14-
CompatibilityCallToolResultSchema,
1514
CompleteRequest,
1615
CompleteResultSchema,
1716
EmptyResultSchema,
@@ -377,9 +376,7 @@ export class Client<
377376

378377
async callTool(
379378
params: CallToolRequest["params"],
380-
resultSchema:
381-
| typeof CallToolResultSchema
382-
| typeof CompatibilityCallToolResultSchema = CallToolResultSchema,
379+
resultSchema: typeof CallToolResultSchema,
383380
options?: RequestOptions,
384381
) {
385382
return this.request(

src/types.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -752,15 +752,6 @@ export const CallToolResultSchema = ResultSchema.extend({
752752
isError: z.boolean().default(false).optional(),
753753
});
754754

755-
/**
756-
* CallToolResultSchema extended with backwards compatibility to protocol version 2024-10-07.
757-
*/
758-
export const CompatibilityCallToolResultSchema = CallToolResultSchema.or(
759-
ResultSchema.extend({
760-
toolResult: z.unknown(),
761-
}),
762-
);
763-
764755
/**
765756
* Used by the client to invoke a tool provided by the server.
766757
*/
@@ -1195,9 +1186,6 @@ export type Tool = z.infer<typeof ToolSchema>;
11951186
export type ListToolsRequest = z.infer<typeof ListToolsRequestSchema>;
11961187
export type ListToolsResult = z.infer<typeof ListToolsResultSchema>;
11971188
export type CallToolResult = z.infer<typeof CallToolResultSchema>;
1198-
export type CompatibilityCallToolResult = z.infer<
1199-
typeof CompatibilityCallToolResultSchema
1200-
>;
12011189
export type CallToolRequest = z.infer<typeof CallToolRequestSchema>;
12021190
export type ToolListChangedNotification = z.infer<
12031191
typeof ToolListChangedNotificationSchema

0 commit comments

Comments
 (0)