Skip to main content
Glama
panther-labs

Panther MCP Server

Official

get_permissions

Diagnose permission errors and determine if a new API token is needed by retrieving the current user's permissions for security monitoring.

Instructions

Get the current user's permissions. Use this to diagnose permission errors and determine if a new API token is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_permissions tool handler: an async function decorated with @mcp_tool that fetches and converts the current user's permissions from the REST API, handling errors gracefully.
    @mcp_tool(
        annotations={
            "readOnlyHint": True,
        }
    )
    async def get_permissions() -> dict[str, Any]:
        """
        Get the current user's permissions. Use this to diagnose permission errors and determine if a new API token is needed.
        """
    
        logger.info("Getting permissions")
        try:
            async with get_rest_client() as client:
                result, _ = await client.get("/api-tokens/self")
    
            return {
                "success": True,
                "permissions": convert_permissions(result.get("permissions", [])),
            }
        except Exception as e:
            logger.error(f"Failed to fetch permissions: {str(e)}")
            return {
                "success": False,
                "message": f"Failed to fetch permissions: {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