approve_patch
Approve security patches for vulnerability issues in the ZeroPath MCP Server to manage software security findings.
Instructions
Approve a patch for a specific vulnerability issue.
Args:
issue_id (str): The ID of the issue whose patch should be approved
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes |
Implementation Reference
- The handler function for the 'approve_patch' MCP tool. It validates the issue_id input, makes an authenticated POST request to the ZeroPath API endpoint 'issues/approve-patch', and handles various response codes appropriately, returning success or error messages.@mcp.tool() def approve_patch(issue_id): """ Approve a patch for a specific vulnerability issue. Args: issue_id (str): The ID of the issue whose patch should be approved """ if not issue_id: return "Error: Issue ID is required" response, error = make_api_request("issues/approve-patch", {"issueId": issue_id}) if error: return error if response.status_code == 200: return "Patch approved successfully" elif response.status_code == 401: return "Error: Unauthorized - check API credentials" elif response.status_code == 400: return f"Error: Bad request - {response.text}" else: return f"Error: API returned status {response.status_code}: {response.text}"