Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 41 additions & 39 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,49 +944,51 @@ export const PromptListChangedNotificationSchema = NotificationSchema.extend({
* Clients should never make tool use decisions based on ToolAnnotations
* received from untrusted servers.
*/
export const ToolAnnotationsSchema = z.object({
/**
* A human-readable title for the tool.
*/
title: z.string().optional(),
export const ToolAnnotationsSchema = z
.object({
/**
* A human-readable title for the tool.
*/
title: z.string().optional(),

/**
* If true, the tool does not modify its environment.
*
* Default: false
*/
readOnlyHint: z.boolean().optional(),
/**
* If true, the tool does not modify its environment.
*
* Default: false
*/
readOnlyHint: z.boolean().optional(),

/**
* If true, the tool may perform destructive updates to its environment.
* If false, the tool performs only additive updates.
*
* (This property is meaningful only when `readOnlyHint == false`)
*
* Default: true
*/
destructiveHint: z.boolean().optional(),
/**
* If true, the tool may perform destructive updates to its environment.
* If false, the tool performs only additive updates.
*
* (This property is meaningful only when `readOnlyHint == false`)
*
* Default: true
*/
destructiveHint: z.boolean().optional(),

/**
* If true, calling the tool repeatedly with the same arguments
* will have no additional effect on the its environment.
*
* (This property is meaningful only when `readOnlyHint == false`)
*
* Default: false
*/
idempotentHint: z.boolean().optional(),
/**
* If true, calling the tool repeatedly with the same arguments
* will have no additional effect on the its environment.
*
* (This property is meaningful only when `readOnlyHint == false`)
*
* Default: false
*/
idempotentHint: z.boolean().optional(),

/**
* If true, this tool may interact with an "open world" of external
* entities. If false, the tool's domain of interaction is closed.
* For example, the world of a web search tool is open, whereas that
* of a memory tool is not.
*
* Default: true
*/
openWorldHint: z.boolean().optional()
});
/**
* If true, this tool may interact with an "open world" of external
* entities. If false, the tool's domain of interaction is closed.
* For example, the world of a web search tool is open, whereas that
* of a memory tool is not.
*
* Default: true
*/
openWorldHint: z.boolean().optional()
})
.catchall(z.unknown());

/**
* Definition for a tool the client can call.
Expand Down
Loading