feat: add tags support to tools for A2A AgentCard skill metadata#1614
feat: add tags support to tools for A2A AgentCard skill metadata#1614anuyog1004 wants to merge 2 commits intostrands-agents:mainfrom
Conversation
- Add tags field to ToolSpec TypedDict as NotRequired[list[str]] - Update @tool decorator to accept optional tags parameter - Modify A2A server to extract tags from tool config - Add comprehensive tests for tags functionality Resolves strands-agents#1261
|
The integration test failures are unrelated to this PR:
These specific failing tests:
The changes in this PR only add a |
|
Hi, Can I please get a review on this. Thanks! |
| assert "tags" not in untagged_tool.tool_spec | ||
|
|
||
|
|
||
| def test_tool_decorator_with_multiple_tags(): |
There was a problem hiding this comment.
Nit: This test is already covered by test_tool_decorator_with_tags
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Thank you for your contribution and sorry for the delay. Overall, PR looks good, but would you be able to run |
Addressed PR review nit: this test duplicated coverage already provided by test_tool_decorator_with_tags.
|
Hi @pgrayy, thanks for reviewing. I have addressed the nit comment on the unit test. |
| inputSchema: JSONSchema | ||
| name: str | ||
| outputSchema: NotRequired[JSONSchema] | ||
| tags: NotRequired[list[str]] |
There was a problem hiding this comment.
Sorry I didn't catch this in the first review, but I'm not so sure the tool spec is a safe spot for the tags field. Model providers might throw an error if provided. I think storing the tags on the tool object itself would be better.
Description
Adds support for tags to tools, enabling them to be populated in the A2A AgentCard skill metadata.
Related Issues
Resolves #1261
Documentation PR
N/A. This is an additive feature to the existing
@tooldecorator. Usage is demonstrated in the PR description.Type of Change
Bug fix
Testing
How have you tested the change?
hatch fmt --formatterandhatch fmt --linter- all checks passedhatch test- all tests passedhatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.