Revert "Remove CompatibilityCallToolResult"
This commit is contained in:
parent
45af3820fa
commit
1962943b22
1 changed files with 16 additions and 1 deletions
12
src/types.ts
12
src/types.ts
|
|
@ -752,6 +752,15 @@ export const CallToolResultSchema = ResultSchema.extend({
|
|||
isError: z.boolean().default(false).optional(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CallToolResultSchema extended with backwards compatibility to protocol version 2024-10-07.
|
||||
*/
|
||||
export const CompatibilityCallToolResultSchema = CallToolResultSchema.or(
|
||||
ResultSchema.extend({
|
||||
toolResult: z.unknown(),
|
||||
}),
|
||||
);
|
||||
|
||||
/**
|
||||
* Used by the client to invoke a tool provided by the server.
|
||||
*/
|
||||
|
|
@ -1186,6 +1195,9 @@ export type Tool = z.infer<typeof ToolSchema>;
|
|||
export type ListToolsRequest = z.infer<typeof ListToolsRequestSchema>;
|
||||
export type ListToolsResult = z.infer<typeof ListToolsResultSchema>;
|
||||
export type CallToolResult = z.infer<typeof CallToolResultSchema>;
|
||||
export type CompatibilityCallToolResult = z.infer<
|
||||
typeof CompatibilityCallToolResultSchema
|
||||
>;
|
||||
export type CallToolRequest = z.infer<typeof CallToolRequestSchema>;
|
||||
export type ToolListChangedNotification = z.infer<
|
||||
typeof ToolListChangedNotificationSchema
|
||||
|
|
|
|||
Loading…
Reference in a new issue