docs(harness): clarify grep_files/edit_file/glob_files tool descriptions#2243
Open
wzq-xzwj wants to merge 1 commit into
Open
docs(harness): clarify grep_files/edit_file/glob_files tool descriptions#2243wzq-xzwj wants to merge 1 commit into
wzq-xzwj wants to merge 1 commit into
Conversation
…les usage Improve tool descriptions to reduce model confusion, without changing behavior: - grep_files `glob`: state that the filter matches the file name only and that path-based patterns like **/*.java are not supported here (the search already recurses into subdirectories). This reflects the javaSearch fallback, which matches against `path.getFileName()`. - edit_file `old_string`: note it must match exactly once unless replace_all is true, otherwise the edit fails (previously only stated at the method level). - glob_files: clarify it finds files by name and point to grep_files for content search, so models pick the right tool.
AgentScopeJavaBot
left a comment
Collaborator
There was a problem hiding this comment.
🤖 AI Review
| Aspect | Count |
|---|---|
| 🟢 Nitpick (信息性建议,不阻塞合并) | 1 |
| 🟡 Recommended (建议修复,但不阻塞合并) | 1 |
Overall Assessment: COMMENT — 文档改进方向正确,但 grep_files 的 glob 描述与 ripgrep 实现不一致,建议修正描述或统一实现。
AgentScopeJavaBot
left a comment
Collaborator
There was a problem hiding this comment.
🤖 AI Review
| Aspect | Count |
|---|---|
| 🟢 Nitpick (信息性建议,不阻塞合并) | 1 |
| 🟡 Recommended (建议修复,但不阻塞合并) | 1 |
Overall Assessment: COMMENT — 文档改进方向正确,但 grep_files 的 glob 描述与 ripgrep 实现不一致,建议修正描述或统一实现。
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve the descriptions of three harness built-in tools so models pick the
right tool and pass valid arguments. Documentation-only; no behavior change.
Changes
grep_files—globparameterClarify that the filter is matched against the file name only, and that
path-based patterns such as
**/*.javaare not supported here. The searchalready recurses into subdirectories, so a bare
*.javais what's expected.This reflects the
javaSearchfallback inLocalFilesystem, which filters viapath.getFileName():edit_file—old_stringparameterNote at the parameter level that
old_stringmust match exactly once unlessreplace_allis true, otherwise the edit fails. Previously this was only statedin the method-level description.
glob_files— tool descriptionClarify that it finds files by name, and point to
grep_filesfor searchingfile contents, reducing tool-selection confusion.
Rationale
These descriptions are surfaced to the model in the tool schema. Vague or missing
guidance leads models to, e.g., pass
**/*.javatogrep_files(which thenmatches nothing via the Java fallback), or to confuse
glob_fileswithgrep_files.Testing
mvn -pl agentscope-harness spotless:check→ BUILD SUCCESS.