Skip to content

fix(shell-execute): optimize working_directory parameter and tool usage hints#2107

Open
chcodex wants to merge 3 commits into
agentscope-ai:mainfrom
chcodex:fix/shell-tool-optimize
Open

fix(shell-execute): optimize working_directory parameter and tool usage hints#2107
chcodex wants to merge 3 commits into
agentscope-ai:mainfrom
chcodex:fix/shell-tool-optimize

Conversation

@chcodex

@chcodex chcodex commented Jul 10, 2026

Copy link
Copy Markdown

AgentScope-Java Version

Based on upstream/main

Description

Three optimizations for ShellExecuteTool:

  1. refactor(tool): Mark working_directory parameter as non-required (required = false)
  2. fix(agent): Improve workingDirectory parameter description
  3. docs(shell-execute): Add prompt suggesting llm prefer special tools (read_file, write_file, etc.) over shell commands when applicable

How to Test

  • Verify working_directory parameter is non-required
  • Verify parameter descriptions are clear
  • Verify shell tool prompt message is correct

Checklist

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@chcodex chcodex requested a review from a team July 10, 2026 14:46
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant