Skip to main content
Glama
panther-labs

Panther MCP Server

Official

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
NameRequiredDescriptionDefault
helper_idYesThe 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)}",
            }

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