Skip to content

Commit 00355e8

Browse files
mcowgerchrarnoldus
authored andcommitted
Update tool defintion required fields to match their actual descriptions in text, and align required fields to disallow 'null'.
1 parent 322a74e commit 00355e8

File tree

12 files changed

+16
-17
lines changed

12 files changed

+16
-17
lines changed

src/core/prompts/tools/native-tools/ask_followup_question.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export default {
1515
description: "Clear, specific question that captures the missing information you need",
1616
},
1717
follow_up: {
18-
type: ["array", "null"],
18+
type: "array",
1919
description:
20-
"Optional list of 2-4 suggested responses; each suggestion must be a complete, actionable answer and may include a mode switch",
20+
"Required list of 2-4 suggested responses; each suggestion must be a complete, actionable answer and may include a mode switch",
2121
items: {
2222
type: "object",
2323
properties: {
@@ -31,7 +31,7 @@ export default {
3131
"Optional mode slug to switch to if this suggestion is chosen (e.g., code, architect)",
3232
},
3333
},
34-
required: ["text", "mode"],
34+
required: ["text"],
3535
additionalProperties: false,
3636
},
3737
minItems: 2,

src/core/prompts/tools/native-tools/browser_action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default {
5757
description: "Text to type when performing the type action",
5858
},
5959
},
60-
required: ["action", "url", "coordinate", "size", "text"],
60+
required: ["action"],
6161
additionalProperties: false,
6262
},
6363
},

src/core/prompts/tools/native-tools/codebase_search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
description: "Optional subdirectory (relative to the workspace) to limit the search scope",
2020
},
2121
},
22-
required: ["query", "path"],
22+
required: ["query"],
2323
additionalProperties: false,
2424
},
2525
},

src/core/prompts/tools/native-tools/execute_command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
description: "Optional working directory for the command, relative or absolute",
2020
},
2121
},
22-
required: ["command", "cwd"],
22+
required: ["command"],
2323
additionalProperties: false,
2424
},
2525
},

src/core/prompts/tools/native-tools/generate_image.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default {
2525
"Optional path (relative to the workspace) to an existing image to edit; supports PNG, JPG, JPEG, GIF, and WEBP",
2626
},
2727
},
28-
required: ["prompt", "path", "image"],
28+
required: ["prompt", "path"],
2929
additionalProperties: false,
3030
},
3131
},

src/core/prompts/tools/native-tools/list_files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export default {
1515
description: "Directory path to inspect, relative to the workspace",
1616
},
1717
recursive: {
18-
type: ["boolean", "null"],
19-
description: "Set true to list contents recursively; omit or false to show only the top level",
18+
type: ["boolean"],
19+
description: "Set true to list contents recursively; false to show only the top level",
2020
},
2121
},
2222
required: ["path", "recursive"],

src/core/prompts/tools/native-tools/new_task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
"Optional initial todo list written as a markdown checklist; required when the workspace mandates todos",
2525
},
2626
},
27-
required: ["mode", "message", "todos"],
27+
required: ["mode", "message"],
2828
additionalProperties: false,
2929
},
3030
},

src/core/prompts/tools/native-tools/read_file.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ export default {
2828
type: "string",
2929
pattern: "^\\d+-\\d+$",
3030
},
31-
minItems: 1,
3231
},
3332
},
34-
required: ["path", "line_ranges"],
33+
required: ["path"],
3534
additionalProperties: false,
3635
},
3736
minItems: 1,

src/core/prompts/tools/native-tools/run_slash_command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
description: "Optional additional context or arguments for the command",
2020
},
2121
},
22-
required: ["command", "args"],
22+
required: ["command"],
2323
additionalProperties: false,
2424
},
2525
},

src/core/prompts/tools/native-tools/search_and_replace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default {
3939
description: "Set true to ignore case when matching",
4040
},
4141
},
42-
required: ["path", "search", "replace", "start_line", "end_line", "use_regex", "ignore_case"],
42+
required: ["path", "search", "replace"],
4343
additionalProperties: false,
4444
},
4545
},

0 commit comments

Comments
 (0)