remove_deployment
Delete a specified deployment by its name to manage resources effectively. Returns details of the removed deployment for tracking and verification.
Instructions
Remove an existing deployment.
Args: deployment_name: The name of the deployment to remove.
Returns: A dictionary containing the response message and details of the deleted deployment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deployment_name | Yes |
Input Schema (JSON Schema)
{
"properties": {
"deployment_name": {
"title": "Deployment Name",
"type": "string"
}
},
"required": [
"deployment_name"
],
"title": "remove_deploymentArguments",
"type": "object"
}
Implementation Reference
- src/mcp_server.py:962-962 (registration)Registers the remove_deployment tool using the MCP decorator.@mcp.tool()
- src/mcp_server.py:963-977 (handler)The handler function that implements the logic to remove a deployment by calling deployment_client.delete_deployment and returning the response as a dictionary.def remove_deployment(deployment_name: str) -> Dict[str, Any]: """ Remove an existing deployment. Args: deployment_name: The name of the deployment to remove. Returns: A dictionary containing the response message and details of the deleted deployment. """ # Remove the deployment delete_deployment_response = deployment_client.delete_deployment(deployment_name=deployment_name) # Return the response as a dictionary return delete_deployment_response.to_dict()