Skip to main content
Glama
panther-labs

Panther MCP Server

Official

list_users

Read-only

Retrieve and display all user accounts within the Panther security monitoring platform to manage access and permissions.

Instructions

List all Panther user accounts.

Returns: Dict containing: - success: Boolean indicating if the query was successful - users: List of user accounts if successful - total_users: Number of users returned - has_next_page: Boolean indicating if more results are available - next_cursor: Cursor for fetching the next page of results - message: Error message if unsuccessful

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoOptional cursor for pagination from a previous query
limitNoMaximum number of results to return (1-60)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The @mcp_tool decorated handler function implementing the list_users tool. Includes input schema via Annotated Fields with Pydantic validation, fetches users from Panther REST API /users endpoint with pagination support (cursor/limit), handles errors, and returns structured response with success flag, users list, pagination info.
    @mcp_tool(
        annotations={
            "permissions": all_perms(Permission.USER_READ),
            "readOnlyHint": True,
        }
    )
    async def list_users(
        cursor: Annotated[
            str | None,
            Field(description="Optional cursor for pagination from a previous query"),
        ] = None,
        limit: Annotated[
            int,
            Field(
                description="Maximum number of results to return (1-60)",
                ge=1,
                le=60,
            ),
        ] = 60,
    ) -> dict[str, Any]:
        """List all Panther user accounts.
    
        Returns:
            Dict containing:
            - success: Boolean indicating if the query was successful
            - users: List of user accounts if successful
            - total_users: Number of users returned
            - has_next_page: Boolean indicating if more results are available
            - next_cursor: Cursor for fetching the next page of results
            - message: Error message if unsuccessful
        """
        logger.info("Fetching Panther users")
    
        try:
            # Use REST API with pagination support
            params = {"limit": limit}
            if cursor:
                params["cursor"] = cursor
    
            async with get_rest_client() as client:
                result, status = await client.get(
                    "/users", params=params, expected_codes=[200]
                )
    
            if status != 200:
                raise Exception(f"API request failed with status {status}")
    
            users = result.get("results", [])
            next_cursor = result.get("next")
    
            logger.info(f"Successfully retrieved {len(users)} users")
    
            return {
                "success": True,
                "users": users,
                "total_users": len(users),
                "has_next_page": next_cursor is not None,
                "next_cursor": next_cursor,
            }
    
        except Exception as e:
            logger.error(f"Failed to fetch users: {str(e)}")
            return {
                "success": False,
                "message": f"Failed to fetch users: {str(e)}",
            }
  • The @mcp_tool decorator registers list_users in the tool registry with required permissions (USER_READ) and read-only hint. The registry is triggered by module import in tools/__init__.py and registered to MCP server via register_all_tools in server.py.
    @mcp_tool(
        annotations={
            "permissions": all_perms(Permission.USER_READ),
            "readOnlyHint": True,
        }
    )
  • Input schema defined using Annotated types and Pydantic Field for cursor (optional pagination string) and limit (1-60 integer). Output is a dict with success, users, total_users, has_next_page, next_cursor or error message.
        cursor: Annotated[
            str | None,
            Field(description="Optional cursor for pagination from a previous query"),
        ] = None,
        limit: Annotated[
            int,
            Field(
                description="Maximum number of results to return (1-60)",
                ge=1,
                le=60,
            ),
        ] = 60,
    ) -> dict[str, Any]:
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations provide readOnlyHint=true, and the description doesn't contradict this. The description adds valuable behavioral context beyond annotations: it specifies required permissions, describes the pagination mechanism (cursor-based), and details the exact return structure including success indicators and error handling. This goes well beyond what annotations alone provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. It starts with the core purpose, then provides detailed return format, and ends with permissions. While the return format section is somewhat lengthy, every sentence provides essential information that earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (pagination, permissions, structured returns) and the presence of both annotations and output schema information in the description, the description is complete. It covers purpose, behavior, return format, and permissions - everything needed for an agent to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the input schema already fully documents both parameters (cursor for pagination, limit with range constraints). The description doesn't add any additional parameter semantics beyond what's in the schema, but the schema coverage is comprehensive so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verb ('List') and resource ('all Panther user accounts'), making it immediately understandable. It distinguishes itself from sibling tools like 'get_user' (which presumably fetches a single user) by specifying it returns multiple users.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the permissions requirement ('Read User Info'), but doesn't explicitly state when to use this tool versus alternatives like 'get_user' or other list_* tools. No explicit guidance on when-not-to-use or comparisons with siblings is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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