Skip to main content
Glama

get_roles

Retrieve all available user roles (e.g., Viewer, Editor, Admin) for assignment within the Coroot observability platform, ensuring precise access control and management.

Instructions

Get available user roles.

Returns all available roles that can be assigned to users (e.g., Viewer, Editor, Admin).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and handler for 'get_roles'. This is the entry point decorated with @mcp.tool() that executes the tool logic by calling the implementation wrapper.
    @mcp.tool() async def get_roles() -> dict[str, Any]: """Get available user roles. Returns all available roles that can be assigned to users (e.g., Viewer, Editor, Admin). """ return await get_roles_impl() # type: ignore[no-any-return]
  • Helper implementation that wraps the client.get_roles() call, adds success wrapper, and handles via @handle_errors decorator.
    async def get_roles_impl() -> dict[str, Any]: """Get available roles.""" roles = await get_client().get_roles() return { "success": True, "roles": roles, }
  • Core API client method that performs the HTTP GET request to /api/roles to fetch the roles data.
    async def get_roles(self) -> dict[str, Any]: """Get available roles. Returns: List of available roles. """ response = await self._request("GET", "/api/roles") data: dict[str, Any] = response.json() return data

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/jamesbrink/mcp-coroot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server