Skip to content

Conversation

@zhangyunan1994
Copy link
Contributor

@zhangyunan1994 zhangyunan1994 commented Jan 8, 2026

AgentScope-Java Version

1.0.7-SNAPSHOT

Description

Because the tool methods lack the @ToolParam annotation, the required parameters are not passed when the tools are invoked.

  • Add the @ToolParam annotation to the demand parameter of the generatePython method
  • Add the @ToolParam annotation to the demand parameter of the generatePoem method
  • Clearly specify parameter names and descriptions to improve the metadata accuracy of the tool methods
  • Enhance code readability for easier annotation-driven processing and future extension

Checklist

Please check the following items before code is ready to be reviewed.

  • 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

- 在 generatePython 方法的 demand 参数上添加 @ToolParam 注解
- 在 generatePoem 方法的 demand 参数上添加 @ToolParam 注解
- 明确参数名称和描述,提高工具方法的元数据准确性
- 优化代码可读性,便于注解驱动的处理和扩展
@zhangyunan1994 zhangyunan1994 requested a review from a team January 8, 2026 07:29
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zhangyunan1994 zhangyunan1994 changed the title refactor(tool): 为工具方法参数添加注解 refactor(tool): 补充 RoutingByToolCallsExample 缺失的 ToolParam 注解 Jan 8, 2026
Copy link
Collaborator

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please translate the PR title and content into English only :)

@zhangyunan1994 zhangyunan1994 changed the title refactor(tool): 补充 RoutingByToolCallsExample 缺失的 ToolParam 注解 refactor(tool): Add the missing @ToolParam annotations to RoutingByToolCallsExample. Jan 9, 2026
@zhangyunan1994
Copy link
Contributor Author

Translation completed.

@AlbumenJ AlbumenJ merged commit 8d06f2f into agentscope-ai:main Jan 9, 2026
4 checks passed
yaohuitc pushed a commit to yaohuitc/agentscope-java that referenced this pull request Jan 10, 2026
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.

2 participants