adk-java icon indicating copy to clipboard operation
adk-java copied to clipboard

McpToolset changes breaks the "SoftwareBugAssistant" sample

Open manojkumarredbus opened this issue 1 year ago • 2 comments

Describe the bug McpToolset changes breaks the "SoftwareBugAssistant" sample

To Reproduce Steps to reproduce the behavior:

  1. Clone ADK from master
  2. Clone adk-samples from master
  3. In POM of "adk-samples" refer to the ADK cloned in step 1,

Expected behavior When taken latest pull the functionality broke. It is better if a different version of class was created for McpToolset instead of changing the design pattern of the class.

Screenshots

Image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Java version:
  • ADK version(see maven dependency):

Additional context On attempting to fix it just needs more and objects

Image Image

It almost looks like creating circular dependency with Aggents and MCP Toolsets needing each other for definition.

manojkumarredbus avatar Jul 10 '25 06:07 manojkumarredbus

Hi Manoj!

Can you check again?

We did the rollback in https://github.com/google/adk-java/commit/2aa474dc7106849029ab618a3e00304c25965235

shukladivyansh avatar Jul 14 '25 16:07 shukladivyansh

With these changes, it seems to be working again!

 McpToolset result=new McpToolset(params, new ObjectMapper());
            Flowable<BaseTool> basetool = result.getTools(null);
List<BaseTool> allTools = basetool.toList().blockingGet();

Suggestion, please see if you can add comment on top of getTools(ReadonlyContext readonlyContext)....that readonlyContext is Optional and can be null.

manojkumarredbus avatar Jul 15 '25 12:07 manojkumarredbus