Skip to main content
Glama

get_group

Retrieve detailed information about a specific IAM group in Oracle Cloud Infrastructure, including members and description, by providing the group's OCID.

Instructions

Get detailed information about a specific IAM group.

Args:
    group_id: OCID of the group to retrieve

Returns:
    Detailed group information including members and description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idYes

Implementation Reference

  • MCP tool handler 'mcp_get_group' that uses the helper function to retrieve OCI IAM group details. Includes MCP context handling, logging via wrapper, and error management.
    @mcp.tool(name="get_group")
    @mcp_tool_wrapper(
        start_msg="Getting group details for {group_id}...",
        success_msg="Retrieved group details successfully",
        error_prefix="Error getting group details"
    )
    async def mcp_get_group(ctx: Context, group_id: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific IAM group.
    
        Args:
            group_id: OCID of the group to retrieve
    
        Returns:
            Detailed group information including members and description
        """
        return get_group(oci_clients["identity"], group_id)
  • Core implementation helper 'get_group' that calls OCI IdentityClient.get_group to fetch and format group details from the OCI API.
    def get_group(identity_client: oci.identity.IdentityClient, group_id: str) -> Dict[str, Any]:
        """
        Get details of a specific group.
        
        Args:
            identity_client: OCI Identity client
            group_id: OCID of the group
            
        Returns:
            Details of the group
        """
        try:
            group = identity_client.get_group(group_id).data
            
            group_details = {
                "id": group.id,
                "name": group.name,
                "description": group.description,
                "lifecycle_state": group.lifecycle_state,
                "time_created": str(group.time_created),
                "compartment_id": group.compartment_id,
            }
            
            logger.info(f"Retrieved details for group {group_id}")
            return group_details
            
        except Exception as e:
            logger.exception(f"Error getting group details: {e}")
            raise
  • Registration of the 'get_group' tool using the MCP @mcp.tool decorator.
    @mcp.tool(name="get_group")
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions retrieving 'detailed information' but lacks critical behavioral details: it doesn't specify required permissions, rate limits, error conditions, or whether it's a read-only operation. For a tool with zero annotation coverage, this is insufficient.

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 concise, with a clear purpose statement followed by Args and Returns sections. Every sentence adds value, though it could be slightly more front-loaded by integrating the parameter explanation into the main description.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameter, but lacks behavioral context and usage guidelines, leaving gaps for an AI agent to operate effectively.

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

Parameters4/5

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

The description adds meaningful context for the single parameter: 'group_id: OCID of the group to retrieve.' Since schema description coverage is 0%, this compensates well by explaining the parameter's purpose and format (OCID). With only one parameter, this is adequate, though not exhaustive.

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 tool's purpose: 'Get detailed information about a specific IAM group.' It specifies the verb ('Get') and resource ('IAM group'), but doesn't explicitly differentiate it from sibling tools like 'list_groups' or 'get_user', which would require a 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. It doesn't mention sibling tools like 'list_groups' (for listing all groups) or 'get_user' (for user details), nor does it specify prerequisites or exclusions for usage.

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/jopsis/mcp-server-oci'

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