get_global_helper
Retrieve detailed information about a Panther global helper by ID, including Python body code and usage details for security monitoring and detection rules.
Instructions
Get detailed information about a Panther global helper by ID
Returns complete global helper information including Python body code and usage details.
Permissions:{'all_of': ['View Rules']}
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| helper_id | Yes | The ID of the global helper to fetch |
Implementation Reference
- The handler function for the 'get_global_helper' tool, including @mcp_tool registration decorator, input schema via Pydantic Annotated Field, and the core logic to fetch global helper details from Panther API via REST client.@mcp_tool( annotations={ "permissions": all_perms(Permission.RULE_READ), "readOnlyHint": True, } ) async def get_global_helper( helper_id: Annotated[ str, Field( description="The ID of the global helper to fetch", examples=["MyGlobalHelper", "AWSUtilities", "CrowdStrikeHelpers"], ), ], ) -> dict[str, Any]: """Get detailed information about a Panther global helper by ID Returns complete global helper information including Python body code and usage details. """ logger.info(f"Fetching global helper details for helper ID: {helper_id}") try: async with get_rest_client() as client: # Allow 404 as a valid response to handle not found case result, status = await client.get( f"/globals/{helper_id}", expected_codes=[200, 404] ) if status == 404: logger.warning(f"No global helper found with ID: {helper_id}") return { "success": False, "message": f"No global helper found with ID: {helper_id}", } logger.info( f"Successfully retrieved global helper details for helper ID: {helper_id}" ) return {"success": True, "global_helper": result} except Exception as e: logger.error(f"Failed to get global helper details: {str(e)}") return { "success": False, "message": f"Failed to get global helper details: {str(e)}", }