Skip to main content
Glama
dstreefkerk

ms-sentinel-mcp-server

by dstreefkerk

entra_id_list_groups

Retrieve group information from Entra ID (Azure AD) using Microsoft Graph API to manage access and permissions in Microsoft Sentinel environments.

Instructions

List groups in Entra ID (Azure AD) via Microsoft Graph API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsYes

Implementation Reference

  • The EntraIDListGroupsTool class defines the tool with name 'entra_id_list_groups' and implements the handler logic in the 'run' method, which checks permissions, fetches all groups from the Microsoft Graph API '/groups' endpoint using GraphApiClient, handles pagination, and raises permission errors if Group.Read.All is missing.
    class EntraIDListGroupsTool(EntraIDToolBase):
        """
        Tool to list groups in Entra ID (Azure AD) via Microsoft Graph API.
        """
    
        name = "entra_id_list_groups"
        description = "List groups in Entra ID (Azure AD) via Microsoft Graph API."
    
        async def run(self, ctx: Context, **kwargs):
            self.check_graph_permissions()
            client = GraphApiClient()
            url = f"{GRAPH_API_BASE}/groups"
            try:
    
                def fetch():
                    groups = []
                    for page in client.call_azure_rest_api("GET", url):
                        groups.extend(page.get("value", []))
                    return groups
    
                return await run_in_thread(fetch, name="entra_id_list_groups")
            except requests.HTTPError as e:
                if e.response.status_code == 403:
                    raise Exception("Permission denied: Group.Read.All is required.") from e
                raise
  • The 'register_tools' function registers the EntraIDListGroupsTool (along with other Entra ID tools) with the MCP server instance via the 'register' class method.
    def register_tools(mcp):
        """
        Register all Entra ID tools with the MCP server instance.
    
        Args:
            mcp: The MCP server instance.
        """
        EntraIDListUsersTool.register(mcp)
        EntraIDGetUserTool.register(mcp)
        EntraIDListGroupsTool.register(mcp)
        EntraIDGetGroupTool.register(mcp)
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action and API. It doesn't disclose behavioral traits such as pagination, rate limits, authentication requirements, error handling, or whether it's read-only (implied by 'List' but not explicit). This leaves significant gaps for agent understanding.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste—it directly states the tool's purpose and API. It's appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (list operation with 1 undocumented parameter), no annotations, and no output schema, the description is incomplete. It lacks details on parameters, behavioral context, and return values, making it insufficient for reliable agent use despite its conciseness.

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

Parameters1/5

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

Schema description coverage is 0%, and the single parameter 'kwargs' is undocumented in both schema and description. The description adds no meaning beyond the schema, failing to explain what 'kwargs' should contain (e.g., query parameters, filters) or its format, leaving the parameter semantics unclear.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('groups in Entra ID'), and specifies the API used ('via Microsoft Graph API'). It distinguishes from siblings like 'entra_id_get_group' (singular retrieval) and 'entra_id_list_users' (different resource type). However, it doesn't explicitly differentiate scope from all siblings, keeping it at 4 rather than 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'entra_id_list_users' or other list tools in the sibling set. It lacks context about prerequisites, filtering capabilities, or performance considerations, offering minimal usage direction.

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/dstreefkerk/ms-sentinel-mcp-server'

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