Skip to main content
Glama
panther-labs

Panther MCP Server

Official

get_role

Retrieve comprehensive details of a specific role, including permissions and settings, by providing the role ID. Essential for managing access and security configurations on Panther MCP Server.

Instructions

Get detailed information about a Panther role by ID

Returns complete role information including all permissions and settings.

Permissions:{'all_of': ['Read User Info']}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
role_idYesThe ID of the role to fetch

Implementation Reference

  • The main handler function for the 'get_role' tool. It retrieves detailed role information from the Panther API using the provided role_id, handles 404 not found cases, and returns success/error responses.
    async def get_role( role_id: Annotated[ str, Field( description="The ID of the role to fetch", examples=["Admin"], ), ], ) -> dict[str, Any]: """Get detailed information about a Panther role by ID Returns complete role information including all permissions and settings. """ logger.info(f"Fetching role details for role ID: {role_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"/roles/{role_id}", expected_codes=[200, 404] ) if status == 404: logger.warning(f"No role found with ID: {role_id}") return { "success": False, "message": f"No role found with ID: {role_id}", } logger.info(f"Successfully retrieved role details for role ID: {role_id}") return {"success": True, "role": result} except Exception as e: logger.error(f"Failed to get role details: {str(e)}") return { "success": False, "message": f"Failed to get role details: {str(e)}", }
  • The @mcp_tool decorator registers the get_role tool, specifying required permissions (USER_READ) and marking it as read-only.
    @mcp_tool( annotations={ "permissions": all_perms(Permission.USER_READ), "readOnlyHint": True, } )
  • Input schema for the get_role tool parameter 'role_id', defined as a required string with description and example.
    role_id: Annotated[ str, Field( description="The ID of the role to fetch", examples=["Admin"], ), ],

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