modify_deployment_config
Update and adjust deployment configurations, including guardrail policies and model settings, to ensure AI safety and compliance. Modify settings like input/output guardrails, detector blocks, and additional configurations for tailored deployment management.
Instructions
Modify the deployment configuration and update the deployment.
Args: deployment_name: The name of the deployment to be modified. new_deployment_config: The new deployment configuration to be modified.
Example Usage:
{
"deployment_config": {
sample_deployment_config = {
"name": deployment_name,
"model_saved_name": model_saved_name,
"input_guardrails_policy": {
"policy_name": policy_name,
"enabled": True,
"additional_config": {
"pii_redaction": False #Add these if any additional detectors than that in the policy are needed
},
"block": [
"injection_attack", # Could be any of the active detectors (Ask user if they want to block)
"policy_violation"
]
},
"output_guardrails_policy": {
"policy_name": policy_name,
"enabled": False,
"additional_config": {
"hallucination": False, #Add these if any additional detectors than that in the policy are needed
"adherence": False,
"relevancy": False
},
"block": [
"nsfw" # Could be any of the active detectors (Ask user if they want to block)
]
},
}
}
Returns: A dictionary containing the response message and details of the modified deployment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deployment_name | Yes | ||
| new_deployment_config | Yes |
Implementation Reference
- src/mcp_server.py:912-960 (handler)The handler function for the 'modify_deployment_config' MCP tool. Decorated with @mcp.tool() for automatic registration and schema inference from type hints and docstring. Modifies the deployment config using deployment_client and returns the result as a dict.@mcp.tool() def modify_deployment_config(deployment_name: str, new_deployment_config: Dict[str, Any]) -> Dict[str, Any]: """ Modify the deployment configuration and update the deployment. Args: deployment_name: The name of the deployment to be modified. new_deployment_config: The new deployment configuration to be modified. Example Usage: { "deployment_config": { sample_deployment_config = { "name": deployment_name, "model_saved_name": model_saved_name, "input_guardrails_policy": { "policy_name": policy_name, "enabled": True, "additional_config": { "pii_redaction": False #Add these if any additional detectors than that in the policy are needed }, "block": [ "injection_attack", # Could be any of the active detectors (Ask user if they want to block) "policy_violation" ] }, "output_guardrails_policy": { "policy_name": policy_name, "enabled": False, "additional_config": { "hallucination": False, #Add these if any additional detectors than that in the policy are needed "adherence": False, "relevancy": False }, "block": [ "nsfw" # Could be any of the active detectors (Ask user if they want to block) ] }, } } Returns: A dictionary containing the response message and details of the modified deployment. """ # Modify the deployment using the provided configuration modify_deployment_response = deployment_client.modify_deployment(deployment_name=deployment_name, config=new_deployment_config) # Return the response as a dictionary return modify_deployment_response.to_dict()
- src/mcp_server.py:912-912 (registration)The @mcp.tool() decorator registers the modify_deployment_config function as an MCP tool.@mcp.tool()