Repository navigation
Conversation
Resolve toolsets before serializing Dev UI graphs and preserve their hierarchy with stable parent IDs. Keep graph endpoints usable when discovery fails, without changing synchronous callers. Fixes google#7600
Author
|
@surajksharma07, this is ready for review following your guidance on #7600. The tests cover filters/prefixes, separate toolsets and failed discovery, and the full Python 3.11-3.14 tox matrix passed. I also checked tool-call and tool-response highlighting in the existing UI (screenshots above); no adk-web change was needed. Could you take a look when you have a chance? Happy to adjust anything that doesn't fit the graph design. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Issue or Description of Change
Closes: #7600
Problem
The Dev UI serializes an MCP toolset as a single node named after its class. Its individual tools never reach the graph, and multiple instances collapse into the same node. Tool call events therefore have no matching leaf to highlight.
Solution
Thanks @surajksharma07 for reproducing this and suggesting the endpoint-side resolution approach. I checked the complete rendering flow: the existing frontend highlights the intermediate toolset and both edges once the backend supplies the hierarchy, so no
adk-webproduction change is needed.Testing Plan
Unit tests
Ran the repository's full configured
toxmatrix on Linux, with four isolated environments in parallel:All four environments and the overall
toxinvocation returned 0. Each environment also reports 18 xfailed and 2 non strict xpassed tests. No test-selection exclusions were used.Coverage includes list/predicate filters, prefixes, separate toolsets with different confirmation settings, partial discovery failure, empty listings, nested workflows, node-level graph requests, cached discovery and cancellation propagation. The original missing node regression cases fail before this fix.
Also checked the relevant modules against MCP 1.24.0 on Python 3.11: 169 passed, 1 skipped and 1 deselected on Windows. The deselected case requires Windows symlink privileges; it is included in the full Linux runs above.
Ruff, isort, pyink, compliance, documentation-link and spelling checks passed; the new-file convention check ran through Git Bash. Fresh Linux wheel and source builds also passed. Changed-module mypy results match the base branch's existing
EvalSetreturn type error, with no new errors.Manual end to end tests
Ran ADK Web with a real local stdio MCP server exposing
addandgreet, two filtered/prefixed toolsets (one requiring confirmation), and a local function tool. A deterministic test model calledmath_add(2, 3)and received5.To reproduce, start
adk webfor that agent, open the structure view, and run the tool call. Both toolsets should remain separate. Selecting either the tool-call or tool-response event should highlight the correct agent → toolset → tool path, leaving the unused toolset and local function unhighlighted. Verified both event selections in ADK Web; frontend full-flow tests also cover call/response highlighting in light and dark themes.Tool Call :
Tool Response :
Checklist
toxmatrix passed.