Skip to main content
Glama
panther-labs

Panther MCP Server

Official

update_alert_status

DestructiveIdempotent

Modify the status of security alerts in Panther's monitoring platform to track investigation progress and resolution.

Instructions

Update the status of one or more Panther alerts.

Returns: Dict containing: - success: Boolean indicating if the update was successful - alerts: List of updated alert IDs if successful - message: Error message if unsuccessful

Permissions:{'all_of': ['Manage Alerts']}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alert_idsYesList of alert IDs to update
statusYesNew status for the alerts

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The complete tool implementation including @mcp_tool registration decorator, Pydantic input schema with validation, and handler logic that performs a PATCH request to the Panther REST API to update the status of specified alerts.
    @mcp_tool(
        annotations={
            "permissions": all_perms(Permission.ALERT_MODIFY),
            "destructiveHint": True,
            "idempotentHint": True,
        }
    )
    async def update_alert_status(
        alert_ids: Annotated[
            list[str],
            Field(description="List of alert IDs to update"),
        ],
        status: Annotated[
            str,
            BeforeValidator(_validate_alert_status),
            Field(
                description="New status for the alerts",
                examples=["OPEN", "TRIAGED", "RESOLVED", "CLOSED"],
            ),
        ],
    ) -> dict[str, Any]:
        """Update the status of one or more Panther alerts.
    
        Returns:
            Dict containing:
            - success: Boolean indicating if the update was successful
            - alerts: List of updated alert IDs if successful
            - message: Error message if unsuccessful
        """
        logger.info(f"Updating status for alerts {alert_ids} to {status}")
    
        try:
            # Validate status (defensive programming - should also be caught by validator)
            valid_statuses = {"OPEN", "TRIAGED", "RESOLVED", "CLOSED"}
            if status not in valid_statuses:
                raise ValueError(
                    f"Invalid status '{status}'. Must be one of: {', '.join(sorted(valid_statuses))}"
                )
            # Prepare request body
            body = {
                "ids": alert_ids,
                "status": status,
            }
    
            # Execute the REST API call
            async with get_rest_client() as client:
                result, status_code = await client.patch(
                    "/alerts", json_data=body, expected_codes=[204, 400, 404]
                )
    
            if status_code == 404:
                logger.error(f"One or more alerts not found: {alert_ids}")
                return {
                    "success": False,
                    "message": f"One or more alerts not found: {alert_ids}",
                }
    
            if status_code == 400:
                logger.error(f"Bad request when updating alert status: {alert_ids}")
                return {
                    "success": False,
                    "message": f"Bad request when updating alert status: {alert_ids}",
                }
    
            logger.info(f"Successfully updated {len(alert_ids)} alerts to status {status}")
    
            return {
                "success": True,
                "alerts": alert_ids,  # Return the IDs that were updated
            }
    
        except Exception as e:
            logger.error(f"Failed to update alert status: {str(e)}")
            return {
                "success": False,
                "message": f"Failed to update alert status: {str(e)}",
            }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds valuable behavioral context beyond annotations: it specifies the required permissions ('Manage Alerts') and details the return structure. While annotations already indicate idempotent and destructive operations, the permission requirement and return format disclosure provide additional operational transparency that annotations alone don't cover.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with clear sections: purpose statement, return format, and permissions. Each sentence serves a distinct purpose without redundancy. The only minor improvement would be integrating the permissions more smoothly rather than as a separate tag-like statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, comprehensive annotations (idempotent, destructive), complete schema coverage, and explicit output description, the description provides sufficient context. It covers the essential operational aspects including permissions and return format, making it complete for agent understanding despite the lack of a formal output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already fully documents both parameters. The description doesn't add any parameter-specific semantics beyond what's in the schema, so it meets the baseline expectation without providing extra value. The examples in the schema for 'status' are particularly helpful.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'update' and the resource 'Panther alerts status', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'update_alert_assignee' or 'bulk_update_alerts', which would require more specific scope definition.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'bulk_update_alerts' or 'update_alert_assignee'. It mentions required permissions but doesn't explain use cases, prerequisites, or exclusion criteria, leaving the agent with insufficient context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/panther-labs/mcp-panther'

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