-
Notifications
You must be signed in to change notification settings - Fork 425
Description
🐞 Bug Summary
Associated tools checkboxes in the Edit of virtual servers are not being pre-populated correctly.
The server returns a list of tool names (e.g., ["test"]), while the checkboxes use tool IDs (e.g., "6e95c70ea2cb4fdf87237e9ed6b0468b") as their values.
As a result, no checkboxes are checked even when tools are associated with the server.
🧩 Affected Component
Select the area of the project impacted:
-
mcpgateway- API -
mcpgateway- UI (admin panel) -
mcpgateway.wrapper- stdio wrapper - Federation or Transports
- CLI, Makefiles, or shell scripts
- Container setup (Docker/Podman/Compose)
- Other (explain below)
🔁 Steps to Reproduce
- Associate a tool with a server.
- Reopen the "Edit Server" modal.
- Observe that no checkboxes are checked, even though the server does have associated tools.
🤔 Expected Behavior
When editing a server, checkboxes for associated tools should be pre-checked according to the associatedTools data returned from the backend.
🧠 Environment Info
You can retrieve most of this from the /version endpoint.
| Key | Value |
|---|---|
| Version or commit | 0.6.0 |
| Runtime | Python 3.13.1 |
| Platform / OS | Darwin 24.5.0 (arm64) |
| Container | none |
🧩 Additional Context
There are two possible approaches:
Short term:
-
If tool names are unique, checkboxes could use names instead of IDs, or at minimum the UI should display pills of associated tool names (even if checkboxes can’t be checked yet). That way, users at least see which tools are associated.
Long term (preferred):
-
Change backend response for
associatedToolsto return a list of objects{ id, name }instead of a list of strings. -
This will require changes in multiple places across the pipeline but provides stable identifiers and avoids name collisions.
I am working toward the long-term fix. Please confirm if I should go ahead with the changes across the codebase, or if this mapping is already being handled elsewhere in the pipeline.