Skip to main content
Glama

get_dynamic_group

Retrieve detailed information about a specific Oracle Cloud Infrastructure dynamic group, including matching rules for instance principals, by providing its OCID.

Instructions

Get detailed information about a specific dynamic group.

Args:
    dynamic_group_id: OCID of the dynamic group to retrieve

Returns:
    Detailed dynamic group information including matching rules for instance principals

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dynamic_group_idYes

Implementation Reference

  • Core handler function that executes the OCI API call to retrieve dynamic group details and formats the response.
    def get_dynamic_group(identity_client: oci.identity.IdentityClient, dynamic_group_id: str) -> Dict[str, Any]:
        """
        Get details of a specific dynamic group.
        
        Args:
            identity_client: OCI Identity client
            dynamic_group_id: OCID of the dynamic group
            
        Returns:
            Details of the dynamic group
        """
        try:
            dynamic_group = identity_client.get_dynamic_group(dynamic_group_id).data
            
            dynamic_group_details = {
                "id": dynamic_group.id,
                "name": dynamic_group.name,
                "description": dynamic_group.description,
                "matching_rule": dynamic_group.matching_rule,
                "lifecycle_state": dynamic_group.lifecycle_state,
                "time_created": str(dynamic_group.time_created),
                "compartment_id": dynamic_group.compartment_id,
            }
            
            logger.info(f"Retrieved details for dynamic group {dynamic_group_id}")
            return dynamic_group_details
            
        except Exception as e:
            logger.exception(f"Error getting dynamic group details: {e}")
            raise
  • MCP tool registration with @mcp.tool decorator, wrapper function that injects OCI client and handles errors/logging.
    @mcp.tool(name="get_dynamic_group")
    @mcp_tool_wrapper(
        start_msg="Getting dynamic group details for {dynamic_group_id}...",
        success_msg="Retrieved dynamic group details successfully",
        error_prefix="Error getting dynamic group details"
    )
    async def mcp_get_dynamic_group(ctx: Context, dynamic_group_id: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific dynamic group.
    
        Args:
            dynamic_group_id: OCID of the dynamic group to retrieve
    
        Returns:
            Detailed dynamic group information including matching rules for instance principals
        """
        return get_dynamic_group(oci_clients["identity"], dynamic_group_id)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('get'), but doesn't mention authentication requirements, rate limits, error conditions, or what happens if the dynamic_group_id is invalid. It partially describes the return format ('detailed dynamic group information including matching rules'), but lacks specifics on structure or completeness.

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

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?

For a simple read operation with one parameter and no output schema, the description is minimally adequate. It covers the basic purpose and parameter meaning, but lacks behavioral details (like error handling) that would be helpful given the absence of annotations. The mention of return content ('matching rules for instance principals') partially compensates for no output schema.

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: 'dynamic_group_id: OCID of the dynamic group to retrieve.' This clarifies that the ID is an OCID (Oracle Cloud Identifier) and specifies its purpose. With 0% schema description coverage and only one parameter, this adequately compensates, though it doesn't explain OCID format or validation rules.

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 dynamic group.' It uses a specific verb ('get') and resource ('dynamic group'), but doesn't explicitly differentiate it from sibling tools like 'get_group' or 'list_dynamic_groups' beyond mentioning it's for a 'specific' dynamic group.

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_dynamic_groups' (for listing groups) or 'get_group' (for static groups), nor does it specify prerequisites or contextual constraints for retrieving a specific dynamic group.

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