Skip to content

Commit caa96c5

Browse files
committed
This is technically not read-only but has practically no destructive side effects
Signed-off-by: David Gageot <[email protected]>
1 parent 8ddedb9 commit caa96c5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/tools/builtin/todo.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ func (t *TodoTool) Tools(ctx context.Context) ([]tools.Tool, error) {
148148
Function: &tools.FunctionDefinition{
149149
Name: "create_todo",
150150
Description: "Create a new todo item with a description",
151+
Annotations: tools.ToolAnnotation{
152+
// This is technically not read-only but has practically no destructive side effects.
153+
ReadOnlyHint: &[]bool{true}[0],
154+
},
151155
Parameters: tools.FunctionParamaters{
152156
Type: "object",
153157
Properties: map[string]any{
@@ -165,6 +169,10 @@ func (t *TodoTool) Tools(ctx context.Context) ([]tools.Tool, error) {
165169
Function: &tools.FunctionDefinition{
166170
Name: "create_todos",
167171
Description: "Create a list of new todo items with descriptions",
172+
Annotations: tools.ToolAnnotation{
173+
// This is technically not read-only but has practically no destructive side effects.
174+
ReadOnlyHint: &[]bool{true}[0],
175+
},
168176
Parameters: tools.FunctionParamaters{
169177
Type: "object",
170178
Properties: map[string]any{
@@ -191,6 +199,10 @@ func (t *TodoTool) Tools(ctx context.Context) ([]tools.Tool, error) {
191199
Function: &tools.FunctionDefinition{
192200
Name: "update_todo",
193201
Description: "Update the status of a todo item",
202+
Annotations: tools.ToolAnnotation{
203+
// This is technically not read-only but has practically no destructive side effects.
204+
ReadOnlyHint: &[]bool{true}[0],
205+
},
194206
Parameters: tools.FunctionParamaters{
195207
Type: "object",
196208
Properties: map[string]any{

0 commit comments

Comments
 (0)