Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions tools/file_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,22 @@ def _check_file_reqs():
},
},
"required": ["mode"],
# The handler enforces mode-conditional requirements (see _handle_patch:
# mode=replace needs path+old_string+new_string; mode=patch needs patch).
# Express that in the schema so tool-using LLMs that honor JSON Schema
# literally (e.g. grok-4.3) emit the required fields up-front instead
# of looping on python validator errors. 1Team-Engineering/hermes-agent
# patch: grok-tool-call-tolerance.
"oneOf": [
{
"properties": {"mode": {"const": "replace"}},
"required": ["mode", "path", "old_string", "new_string"],
},
{
"properties": {"mode": {"const": "patch"}},
"required": ["mode", "patch"],
},
],
},
}

Expand Down
9 changes: 9 additions & 0 deletions tools/kanban_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,15 @@ def _board_schema_prop() -> dict[str, str]:
"board": _board_schema_prop(),
},
"required": [],
# The handler enforces "summary or result" (line ~543). Express that
# constraint in the schema itself so tool-using LLMs that read JSON
# Schema literally (e.g. grok-4.3) emit the field instead of silently
# omitting both and then looping on the python validator error.
# 1Team-Engineering/hermes-agent patch: grok-tool-call-tolerance.
"anyOf": [
{"required": ["summary"]},
{"required": ["result"]},
],
},
}

Expand Down