-
Notifications
You must be signed in to change notification settings - Fork 407
Description
🐞 Bug Summary
When calling the /resources/{resource_id}/toggle endpoint with activate=False, the result is success. After this, the resources does not show up in subsequent GET /resources calls, so it is not visible at all in its disabled state. It CAN be re-enabled by calling toggle again with activate=True, after which it does show up in GET /resources again.
Related Item #1: When doing GET /resources/{resource_id}, the is_active field is not returned, so the only way to poll the current active status is to list all resources and look for one that matches the ID.
Related Item #2: For resources, prompts, and tools, the name of the field is is_active/isActive whereas for gateways/servers, the name of the field is enabled (I haven't checked a2a).
Related Item #3: When calling /toggle on any type, it does not actually "toggle" (switch the state from the current state), but instead simply sets the enabled/is_active bool to whatever the activate param is set to. This defaults to True, so calling /toggle without explicitly setting activate will always enable the object.
This same bug likely also effects prompts and tools, but I haven't verified yet.
🧩 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)