Skip to content

Commit 25c8e7c

Browse files
committed
Remove category and extraInfo, add openWorld and caption, add clarification to Tool.description
1 parent eb4abdf commit 25c8e7c

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

schema/draft/schema.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1938,8 +1938,12 @@
19381938
"Tool": {
19391939
"description": "Definition for a tool the client can call.",
19401940
"properties": {
1941+
"annotations": {
1942+
"$ref": "#/definitions/ToolAnnotations",
1943+
"description": "Annotations"
1944+
},
19411945
"description": {
1942-
"description": "A human-readable description of the tool.",
1946+
"description": "A human-readable description of the tool.\n\nThis can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a \"hint\" to the model.",
19431947
"type": "string"
19441948
},
19451949
"inputSchema": {
@@ -1980,6 +1984,24 @@
19801984
],
19811985
"type": "object"
19821986
},
1987+
"ToolAnnotations": {
1988+
"description": "A tool annotation defines additional, optional properties that\ncharacterize the tool's behavior.",
1989+
"properties": {
1990+
"caption": {
1991+
"description": "A succinct user-facing description of the tool.\n\nUnlike Tool.description, this is not intended for use as a \"hint\" to the model.",
1992+
"type": "string"
1993+
},
1994+
"openWorld": {
1995+
"description": "If true, this tool may interact with an open set of \"external\"\nentities, e.g. by making web queries.\n\nIf not set, this is assumed to be true.",
1996+
"type": "boolean"
1997+
},
1998+
"readOnly": {
1999+
"description": "If true, this tool does not perform writes or updates,\nor otherwise change server-side state in ways that would\nbe visible in subsequent tool calls.\n\nIf not set, this is assumed to be false.",
2000+
"type": "boolean"
2001+
}
2002+
},
2003+
"type": "object"
2004+
},
19832005
"ToolListChangedNotification": {
19842006
"description": "An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.",
19852007
"properties": {

schema/draft/schema.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,35 @@ export interface ToolListChangedNotification extends Notification {
696696
method: "notifications/tools/list_changed";
697697
}
698698

699+
/**
700+
* Optional, supplemental properties that characterize a tool's behavior.
701+
*/
702+
export interface ToolAnnotations {
703+
/**
704+
* If true, this tool does not perform writes or updates,
705+
* or otherwise change server-side state in ways that would
706+
* be visible in subsequent tool calls.
707+
*
708+
* If not set, this is assumed to be false.
709+
*/
710+
readOnly?: boolean;
711+
712+
/**
713+
* If true, this tool may interact with an open set of "external"
714+
* entities, e.g. by making web queries.
715+
*
716+
* If not set, this is assumed to be true.
717+
*/
718+
openWorld?: boolean;
719+
720+
/**
721+
* A succinct user-facing description of the tool.
722+
*
723+
* Unlike Tool.description, this is not intended for use as a "hint" to the model.
724+
*/
725+
caption?: string;
726+
}
727+
699728
/**
700729
* Definition for a tool the client can call.
701730
*/
@@ -706,8 +735,14 @@ export interface Tool {
706735
name: string;
707736
/**
708737
* A human-readable description of the tool.
738+
*
739+
* This can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a "hint" to the model.
709740
*/
710741
description?: string;
742+
/**
743+
* Annotations
744+
*/
745+
annotations?: ToolAnnotations;
711746
/**
712747
* A JSON Schema object defining the expected parameters for the tool.
713748
*/

0 commit comments

Comments
 (0)