8000 Fix: Enable underscores in direct method invocations to match hyphens by zastrowm · Pull Request #178 · strands-agents/sdk-python · GitHub
[go: up one dir, main page]

Skip to content

Fix: Enable underscores in direct method invocations to match hyphens #178

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

Merged

Conversation

zastrowm
Copy link
Member
@zastrowm zastrowm commented Jun 4, 2025

Description

Enable direct method tool invocations of example_tool to match tools with the name of example-tool, which fixes #139. In the case where no direct match is found but multiple tools would match, we throw an error to avoid ambiguous errors

Related Issues

#139

Documentation PR

strands-agents/docs#83

Type of Change

  • Bug fix

Testing

[How have you tested the change?]

  • hatch fmt --linter
  • hatch fmt --formatter
  • hatch test --all
  • Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

Checklist

  • I have read the CONTRIBUTING document
  • I have added tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@zastrowm zastrowm requested a review from a team as a code owner June 4, 2025 21:12
zastrowm added a commit to zastrowm/docs that referenced this pull request Jun 5, 2025
Documents the bugfix implemented in strands-agents/sdk-python#178 where underscores take the place of hyphens
Enable direct method tool invocations of `example_tool` to match tools with the name of `example-tool`, which fixes strands-agents#139. In the case where no direct match is found but multiple tools would match, we throw an error to avoid ambiguous errors
@zastrowm zastrowm force-pushed the hyphens_direct_method_invocation branch from d534ac6 to dd14422 Compare June 9, 2025 18:27
@zastrowm zastrowm merged commit aff928c into strands-agents:main Jun 9, 2025
10 checks passed
zastrowm added a commit to strands-agents/docs that referenced this pull request Jun 9, 2025
* feat: Document invoking tools with hyphens

Documents the bugfix implemented in strands-agents/sdk-python#178 where underscores take the place of hyphens

---------

Co-authored-by: Mackenzie Zastrow <zastrowm@users.noreply.github.com>
zastrowm added a commit to zastrowm/sdk-python that referenced this pull request Jun 9, 2025
Per follow-up to strands-agents#178, where we discussed preventing similar_tool and similar-tool from both being added to the tool registry, to avoid ambiguity in direct-method invocations
zastrowm added a commit to zastrowm/sdk-python that referenced this pull request Jun 11, 2025
Per follow-up to strands-agents#178, where we discussed preventing similar_tool and similar-tool from both being added to the tool registry, to avoid ambiguity in direct-method invocations
zastrowm added a commit that referenced this pull request Jun 11, 2025
Per follow-up to #178, where we discussed preventing similar_tool and similar-tool from both being added to the tool registry, to avoid ambiguity in direct-method invocations
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.

[BUG] Unable to directly invoke tools with a hyphen with the tool name
2 participants
0