-
Notifications
You must be signed in to change notification settings - Fork 81
chore(tools): Adding guardrails to MCP server tools #96
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
base: main
Are you sure you want to change the base?
Conversation
8067b77 to
e58ba1f
Compare
| "Deletes the specified instance. WARNING: This action is destructive and cannot be undone. It will " | ||
| "permanently delete the instance and all associated data. The AI client must inform the user of this " | ||
| "destructive nature and ask for explicit confirmation before executing this tool. Do not attempt " | ||
| "this operation without getting a confirmations from the user." |
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.
so do we have a standard annotation for this type of destructive behavior? Is adding destructiveHint not enough? Should we add this to the best practices doc? If this is left off, is there no explicit confirmation from the user to perform this action?
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.
In my testing, I was seeing that without this, the GPT-oss model would be inconsistent in showing a warning. Once I added this, it always shows a confirmation before executing the task.
- Updated the delete/terminate/update tools to add a warning and destructiveHint. Also updated the description to make sure that the AI client asks for a confirmation before proceeding with the tool execution - Generated new denylist from oci-cli version 3.71.1 - Bumped up the versions of servers that have this change - Updated the denylist generator to store the version in the created commands and denylist of the CLI it is generated from
e58ba1f to
0fea9b2
Compare
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.
Couple questions:
- Can this list be overwritten? If so, how?
- We should add a section in the readme of this server for this functionality
Description
The PR adds guardrails to some of the commands that can change the configuration of the OCI system. The changes include:
destructiveHint. Also updated the description to make sure that the AI client asks for a confirmation before proceeding with the tool executionType of change
How Has This Been Tested?
oci-api-mcp-server, you can use the following promptsYou should verify that Cline will not execute the command even when you approve it, as it will hit the denylist
You can set up another MCP server similarly, such as compute. Disable the oci-api-mcp-server and issue a prompt to delete the instance. It should ask for confirmation.
Alternatively, you can also install and start Ollama with gpt-oss and use mcphost to issue prompts. Follow the steps listed at https://github.com/oracle/mcp?tab=readme-ov-file#mcphost