Skip to main content
Glama
ZeroPathAI

ZeroPath MCP Server

Official
by ZeroPathAI

unarchive_issue

Restore archived security issues to active view in ZeroPath MCP Server. Reactivate previously hidden security findings for continued monitoring and management.

Instructions

Unarchive a previously archived security issue to restore it to active view.

Args:
    issue_id: The ID of the issue to unarchive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYes

Implementation Reference

  • Core handler function for the 'unarchive_issue' tool. Registered via @mcp.tool() decorator. Takes issue_id parameter, validates it, calls make_api_request to the 'issues/unarchive' endpoint, and handles the response with appropriate success/error messages.
    @mcp.tool()
    def unarchive_issue(issue_id: str) -> str:
        """
        Unarchive a previously archived security issue to restore it to active view.
    
        Args:
            issue_id: The ID of the issue to unarchive
        """
        if not issue_id:
            return "Error: Issue ID is required"
    
        response, error = make_api_request(
            "issues/unarchive",
            {"issueId": issue_id}
        )
    
        if error:
            return error
    
        if response.status_code == 200:
            return f"Issue {issue_id} unarchived 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}"
  • Helper function used by unarchive_issue to perform the authenticated POST request to the ZeroPath API 'issues/unarchive' endpoint with the issueId in payload.
    def make_api_request(endpoint, payload=None, include_org=True):
        """Make authenticated API request to ZeroPath."""
        if not token_id or not token_secret:
            return None, "Error: Zeropath API credentials not found in environment variables"
    
        headers = {
            "X-ZeroPath-API-Token-Id": token_id,
            "X-ZeroPath-API-Token-Secret": token_secret,
            "Content-Type": "application/json"
        }
    
        if payload is None:
            payload = {}
    
        if include_org and org_id:
            payload["organizationId"] = org_id
    
        try:
            response = requests.post(
                f"{API_BASE_URL}/{endpoint}",
                headers=headers,
                json=payload
            )
            return response, None
        except Exception as e:
            return None, f"Error: {str(e)}"
  • The @mcp.tool() decorator registers the unarchive_issue function as an MCP tool.
    @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZeroPathAI/zeropath-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server