Skip to main content
Glama
panther-labs

Panther MCP Server

Official

get_permissions

Retrieve the current user's permissions to diagnose access issues or verify if a new API token is required. Part of Panther MCP Server for security monitoring and investigations.

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 main handler function for the 'get_permissions' MCP tool. It fetches the current user's permissions from the REST API, converts them using convert_permissions, and returns a success/failure dict.
    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)}", }
  • Registers the 'get_permissions' tool with the MCP registry using the @mcp_tool decorator, specifying it as read-only.
    @mcp_tool( annotations={ "readOnlyHint": True, } )

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