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")

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