Skip to content

Add getTool method for AsyncMcpToolCallback in order to get toolName witch has been prefixed in getToolDefinition #4190

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

Closed

Conversation

shishuiwuhen2009
Copy link
Contributor

Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:

  • Add a Signed-off-by line to each commit (git commit -s) per the DCO
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

For more details, please check the contributor guide.
Thank you upfront!

@markpollack
Copy link
Member

what about this instead, i assume you want to get easy access to the 'original' toolname before the prefix was added?

public String getOriginalToolName() {
    return this.tool.name();
}

This would:

  • Provide access to the original tool name
  • Maintain better encapsulation
  • Be more explicit about intent
  • Not expose internal implementation details

@shishuiwuhen2009
Copy link
Contributor Author

Thank you so much for your suggestions!

@shishuiwuhen2009
Copy link
Contributor Author

fix in #4204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants