Skip to main content
Glama

get_vault

Retrieve detailed information about a specific Oracle Cloud Infrastructure KMS vault, including crypto and management endpoints, by providing its OCID.

Instructions

Get detailed information about a specific KMS vault.

Args:
    vault_id: OCID of the vault to retrieve

Returns:
    Detailed vault information including crypto and management endpoints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vault_idYes

Implementation Reference

  • The primary handler function for the 'get_vault' MCP tool. It wraps the security helper with error handling, logging, and profile checks, then calls get_vault with the KmsVaultClient.
    @mcp.tool(name="get_vault")
    @mcp_tool_wrapper(
        start_msg="Getting vault details for {vault_id}...",
        success_msg="Retrieved vault details successfully",
        error_prefix="Error getting vault details"
    )
    async def mcp_get_vault(ctx: Context, vault_id: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific KMS vault.
    
        Args:
            vault_id: OCID of the vault to retrieve
    
        Returns:
            Detailed vault information including crypto and management endpoints
        """
        return get_vault(oci_clients["kms_vault"], vault_id)
  • MCP tool registration decorator specifying the tool name 'get_vault'.
    @mcp.tool(name="get_vault")
  • Helper function that performs the actual OCI API call to retrieve vault details using KmsVaultClient.get_vault and formats the response.
    def get_vault(kms_vault_client: oci.key_management.KmsVaultClient, vault_id: str) -> Dict[str, Any]:
        """
        Get details of a specific vault.
        
        Args:
            kms_vault_client: OCI KmsVault client
            vault_id: OCID of the vault
            
        Returns:
            Details of the vault
        """
        try:
            vault = kms_vault_client.get_vault(vault_id).data
            
            vault_details = {
                "id": vault.id,
                "display_name": vault.display_name,
                "compartment_id": vault.compartment_id,
                "lifecycle_state": vault.lifecycle_state,
                "time_created": str(vault.time_created),
                "vault_type": vault.vault_type,
                "crypto_endpoint": vault.crypto_endpoint,
                "management_endpoint": vault.management_endpoint,
                "is_primary": vault.is_primary,
                "replica_details": {
                    "replication_id": vault.replica_details.replication_id if vault.replica_details else None,
                } if vault.replica_details else None,
            }
            
            logger.info(f"Retrieved details for vault {vault_id}")
            return vault_details
    
        except Exception as e:
            logger.exception(f"Error getting vault details: {e}")
            raise
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 of behavioral disclosure. It states this is a read operation ('Get'), which implies it's non-destructive, but doesn't cover other critical aspects like authentication requirements, rate limits, error conditions, or response format details. The mention of 'detailed vault information' is vague and lacks specifics on what 'detailed' entails.

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 well-structured and concise, with zero wasted words. It uses a clear header format ('Args:', 'Returns:') and bullet-like presentation, making it easy to parse. Every sentence adds value, and the information is front-loaded with the core purpose stated first.

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 moderate complexity (a read operation with one parameter), no annotations, and no output schema, the description is partially complete. It covers the purpose and parameter semantics adequately but lacks behavioral details and usage guidelines. For a tool in this context, it should ideally include more about authentication, error handling, or output structure to be fully helpful.

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: 'vault_id: OCID of the vault to retrieve.' This clarifies that 'vault_id' is an OCID (Oracle Cloud Identifier), which is crucial semantic information not present in the schema (which has 0% description coverage). Since there's only one parameter, the description effectively compensates for the schema's lack of detail.

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 KMS vault.' It uses a specific verb ('Get') and resource ('KMS vault'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_vaults' or 'get_key', which would be needed for a perfect score.

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_vaults' for listing multiple vaults or 'get_key' for related resources, nor does it specify prerequisites or contexts for usage. This leaves the agent without explicit usage instructions.

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