-
Notifications
You must be signed in to change notification settings - Fork 19
feat: Add support for tool annotations #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6e32690 to
c1b5451
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for tool annotations in the chatlas library, allowing users to provide additional metadata about tools including titles and hints about their behavior. This feature enhances tool usability by providing more context about tool purpose and safety considerations.
Key changes:
- Added
annotationsparameter to tool registration methods - Extended
ContentToolRequestto include tool reference for accessing annotations - Automatic annotation propagation from MCP tools
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| chatlas/_tools.py | Added annotations parameter to Tool class and related methods |
| chatlas/_content.py | Added tool field to ContentToolRequest to enable annotation access |
| chatlas/_chat.py | Modified tool invocation to populate tool reference in requests |
| chatlas/init.py | Added model rebuild calls to resolve forward references |
| tests/test_tool_from_mcp.py | Added test coverage for MCP tool annotation handling |
| tests/test_content_tools.py | Updated tests to include tool references in requests |
| tests/conftest.py | Enhanced test assertions to verify annotation functionality |
| CHANGELOG.md | Documented the new feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.