Skip to main content
Glama
panther-labs

Panther MCP Server

Official

update_alert_assignee

DestructiveIdempotent

Change the assigned user for security alerts by specifying alert IDs and the new assignee's ID to manage alert ownership and response responsibilities.

Instructions

Update the assignee of one or more alerts through the assignee's ID.

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
assignee_idYesThe ID of the user to assign the alerts to

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'update_alert_assignee' tool using the @mcp_tool decorator from the tools registry, specifying ALERT_MODIFY permissions and destructive/idempotent hints.
    @mcp_tool(
        annotations={
            "permissions": all_perms(Permission.ALERT_MODIFY),
            "destructiveHint": True,
            "idempotentHint": True,
        }
    )
  • Input schema defined using Pydantic Annotated types with Field descriptions for alert_ids (list of strings) and assignee_id (string with min_length 1).
        alert_ids: Annotated[
            list[str],
            Field(description="List of alert IDs to update"),
        ],
        assignee_id: Annotated[
            str,
            Field(min_length=1, description="The ID of the user to assign the alerts to"),
        ],
    ) -> dict[str, Any]:
  • The handler function that implements the tool logic: logs the action, prepares PATCH body with ids and assignee, calls client.patch('/alerts'), handles 404/400 errors and exceptions, returns success with alert IDs or error message.
    async def update_alert_assignee(
        alert_ids: Annotated[
            list[str],
            Field(description="List of alert IDs to update"),
        ],
        assignee_id: Annotated[
            str,
            Field(min_length=1, description="The ID of the user to assign the alerts to"),
        ],
    ) -> dict[str, Any]:
        """Update the assignee of one or more alerts through the assignee's ID.
    
        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 assignee for alerts {alert_ids} to user {assignee_id}")
    
        try:
            # Prepare request body
            body = {
                "ids": alert_ids,
                "assignee": assignee_id,
            }
    
            # Execute the REST API call
            async with get_rest_client() as client:
                result, status = await client.patch(
                    "/alerts", json_data=body, expected_codes=[204, 400, 404]
                )
    
            if status == 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 == 400:
                logger.error(f"Bad request when updating alert assignee: {alert_ids}")
                return {
                    "success": False,
                    "message": f"Bad request when updating alert assignee: {alert_ids}",
                }
    
            logger.info(f"Successfully updated assignee for alerts {alert_ids}")
    
            return {
                "success": True,
                "alerts": alert_ids,  # Return the IDs that were updated
            }
    
        except Exception as e:
            logger.error(f"Failed to update alert assignee: {str(e)}")
            return {
                "success": False,
                "message": f"Failed to update alert assignee: {str(e)}",
            }
Behavior4/5

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

Annotations provide idempotentHint and destructiveHint, but the description adds valuable context: it specifies the required permission ('Manage Alerts'), clarifies that it works on one or more alerts (batch operation), and documents the exact return structure. This goes beyond what annotations convey about safety and idempotency.

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 a clear purpose statement followed by return value documentation and permissions. Every sentence serves a distinct purpose, though the permissions formatting could be slightly cleaner.

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 destructive nature (annotations), batch operation capability, detailed return structure documentation, and explicit permission requirements, the description provides complete context for a mutation tool. The output schema existence means return values are adequately covered.

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 input schema already fully documents both parameters. The description doesn't add any additional meaning about parameter usage, constraints, or examples beyond what's in the schema properties, so it meets the baseline for high coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Update the assignee') and resource ('one or more alerts'), distinguishing it from siblings like 'update_alert_status' which modifies a different alert property. It precisely defines the scope through the assignee's ID.

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

Usage Guidelines3/5

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

The description implies usage for reassigning alerts but doesn't explicitly state when to use this versus alternatives like 'bulk_update_alerts' or 'update_alert_status'. It mentions permissions but doesn't provide contextual guidance on appropriate scenarios for assignee changes.

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