-
Notifications
You must be signed in to change notification settings - Fork 410
Rename Toggle Endpoint to State for Clear and Explicit Status Updates #1504
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
Open
rakdutta
wants to merge
14
commits into
main
Choose a base branch
from
Fix_issue_toggle_resource_1497
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
Signed-off-by: rakdutta <[email protected]>
7 tasks
Signed-off-by: rakdutta <[email protected]>
madhav165
reviewed
Nov 26, 2025
Collaborator
madhav165
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crivetimihai Please wait for my RBAC PR before merging this.
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.
closes issue ##1497
The existing /toggle endpoint caused confusion because it did not truly “toggle” the resource state. Instead, it always set the state based on the activate parameter (e.g., activate=true), leading users to assume it was flipping the current status.
To remove ambiguity and make the API behavior explicit, this PR updates the endpoint name from /toggle to /state. The new design clearly communicates that the endpoint sets the state rather than toggling it.
Key Changes
-Improved clarity and consistency across servers, tools, agents, gateways, prompts, resources, and gRPC services.
API Endpoint Updates:
POST /servers/{server_id}/toggleis renamed toPOST /servers/{server_id}/state, with corresponding updates to the handler function name and docstrings inmcpgateway/admin.py. All references to "toggle" are replaced with "set state" for clarity. [1] [2]Documentation and Example Updates:
README.md,docs/docs/index.md,docs/docs/manage/api-usage.md, etc.) now use/state?activate=true|falseinstead of/toggle?activate=true|falsefor setting active/inactive states of entities. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]Terminology Consistency:
gRPC Service Endpoint Update:
POST /grpc/{id}/toggletoPOST /grpc/{id}/statein both the changelog and usage documentation. [1] [2]Test and Example Code Updates:
mcpgateway/admin.pyare updated to use the new endpoint and terminology, ensuring that both happy paths and error cases reflect the "set state" logic.Also fixed team is coming as N/A in list resources page in admin UI.